fine-tuning pitest config and increasing threshold

This commit is contained in:
Michael Hoennig 2019-04-28 11:13:55 +02:00
parent 405568fee4
commit 0257c83fa5
2 changed files with 4 additions and 3 deletions

View File

@ -25,6 +25,7 @@ import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowable;
import static org.assertj.core.api.Assumptions.assumeThat;
import static org.hostsharing.hsadminng.service.accessfilter.JSonAccessFilterTestFixture.*;
import static org.hostsharing.hsadminng.service.accessfilter.JSonBuilder.asJSon;
import static org.hostsharing.hsadminng.service.accessfilter.MockSecurityContext.givenAuthenticatedUser;
@ -142,7 +143,7 @@ public class JSonDeserializationWithAccessFilterUnitTest {
@Test
public void shouldDeserializeRestrictedBigDecimalFieldIfUnchangedByCompareTo() throws IOException {
// given
assertThat(SOME_BIG_DECIMAL_WITH_ANOTHER_SCALE).as("precondition failed").isNotEqualTo(SOME_BIG_DECIMAL);
assumeThat(SOME_BIG_DECIMAL_WITH_ANOTHER_SCALE).isNotEqualTo(SOME_BIG_DECIMAL);
givenJSonTree(asJSon(
ImmutablePair.of("id", 1234L),
ImmutablePair.of("customerId", 888L),

View File

@ -5,7 +5,7 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assumptions.assumeThat;
public class MockSecurityContext {
@ -15,7 +15,7 @@ public class MockSecurityContext {
SecurityContextHolder.setContext(securityContext);
SecurityUtils.clearUserRoles();
assertThat(SecurityUtils.getCurrentUserLogin()).describedAs("precondition failed").hasValue("dummyUser");
assumeThat(SecurityUtils.getCurrentUserLogin()).hasValue("dummyUser");
}
public static void givenUserHavingRole(final Class<?> onClass, final Long onId, final Role role) {