kopia lustrzana
https://github.com/SonarSource/sonarqube.git
synced 2024-08-08 14:11:17 +02:00
fix incomplete assertions
This commit is contained in:
rodzic
332c8e3a40
commit
e15532991b
@ -119,7 +119,7 @@ public class MonitorTest {
|
||||
failed = e.getMessage().equals("Can not start multiple times");
|
||||
}
|
||||
monitor.stop();
|
||||
assertThat(failed);
|
||||
assertThat(failed).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -84,7 +84,7 @@ public class BaseDaoTest {
|
||||
dao.insert(session, myDto);
|
||||
|
||||
session.commit();
|
||||
assertThat(myDto.getId());
|
||||
assertThat(myDto.getId()).isGreaterThan(0);
|
||||
|
||||
long t1 = System.currentTimeMillis() + 1000;
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class EsUtilsTest {
|
||||
|
||||
@Test
|
||||
public void util_class() {
|
||||
assertThat(TestUtils.hasOnlyPrivateConstructors(EsUtils.class));
|
||||
assertThat(TestUtils.hasOnlyPrivateConstructors(EsUtils.class)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -33,7 +33,7 @@ public class CommonRuleKeysTest {
|
||||
|
||||
@Test
|
||||
public void wonderful_test_to_verify_that_this_class_is_an_helper_class() throws Exception {
|
||||
assertThat(TestUtils.hasOnlyPrivateConstructors(CommonRuleKeys.class));
|
||||
assertThat(TestUtils.hasOnlyPrivateConstructors(CommonRuleKeys.class)).isTrue();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ public class RegisterRulesMediumTest {
|
||||
|
||||
// Verify rule has not been updated
|
||||
Rule customRuleReloaded = ruleIndex.getByKey(RuleTesting.XOO_X1);
|
||||
assertThat(DateUtils.isSameInstant(customRuleReloaded.updatedAt(), updatedAt));
|
||||
assertThat(DateUtils.isSameInstant(customRuleReloaded.updatedAt(), updatedAt)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -145,7 +145,7 @@ public class FacetsMediumTest {
|
||||
assertThat(facets.getFacetKeys(FIELD_TAGS)).isEmpty();
|
||||
assertThat(facets.getFacetKeys(FIELD_CREATED_AT)).hasSize(1);
|
||||
FacetValue value = facets.getFacetValues(FIELD_CREATED_AT).iterator().next();
|
||||
assertThat(DateUtils.parseDateTime(value.getKey()).before(new Date()));
|
||||
assertThat(DateUtils.parseDateTime(value.getKey()).before(new Date())).isTrue();
|
||||
assertThat(value.getValue()).isEqualTo(3L);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class ProtobufTest {
|
||||
|
||||
@Test
|
||||
public void only_utils() {
|
||||
assertThat(TestUtils.hasOnlyPrivateConstructors(Protobuf.class));
|
||||
assertThat(TestUtils.hasOnlyPrivateConstructors(Protobuf.class)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -62,7 +62,7 @@ public class KeepOneFilterTest {
|
||||
|
||||
List<Long> snapshotIds = snapshotIds(toDelete);
|
||||
assertThat(snapshotIds).contains(3L);
|
||||
assertThat(snapshotIds.contains(4L));
|
||||
assertThat(snapshotIds).contains(4L);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -80,7 +80,7 @@ public class KeepOneFilterTest {
|
||||
|
||||
List<Long> snapshotIds = snapshotIds(toDelete);
|
||||
assertThat(snapshotIds).contains(1L);
|
||||
assertThat(snapshotIds.contains(4L));
|
||||
assertThat(snapshotIds).contains(4L);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -85,7 +85,7 @@ public class RuleDaoTest {
|
||||
dbTester.prepareDbUnit(getClass(), "shared.xml");
|
||||
|
||||
assertThat(underTest.selectByKeys(dbTester.getSession(), Collections.<RuleKey>emptyList())).isEmpty();
|
||||
assertThat(underTest.selectByKeys(dbTester.getSession(), asList(RuleKey.of("NOT", "FOUND"))).isEmpty());
|
||||
assertThat(underTest.selectByKeys(dbTester.getSession(), asList(RuleKey.of("NOT", "FOUND")))).isEmpty();
|
||||
|
||||
List<RuleDto> rules = underTest.selectByKeys(dbTester.getSession(), asList(RuleKey.of("java", "S001"), RuleKey.of("java", "OTHER")));
|
||||
assertThat(rules).hasSize(1);
|
||||
|
Ładowanie…
Reference in New Issue
Block a user