Fix test errors and comment build.testResources in pom.xml

pull/137/head
johnniang 2019-04-03 09:26:41 +08:00
parent 717e5b25b4
commit ed8d86f2bd
3 changed files with 11 additions and 11 deletions

10
pom.xml
View File

@ -224,11 +224,11 @@
</dependencies>
<build>
<testResources>
<testResource>
<directory>${basedir}/src/main/resources</directory>
</testResource>
</testResources>
<!--<testResources>-->
<!--<testResource>-->
<!--<directory>${basedir}/src/main/resources</directory>-->
<!--</testResource>-->
<!--</testResources>-->
<plugins>
<!-- Spring Boot plugin -->
<plugin>

View File

@ -24,9 +24,9 @@ public class AttachmentTypeTest {
@Test
public void conversionTest() {
assertThat(conversionService.convert("SERVER", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("server", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("Server", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("SerVer", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("LOCAL", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("local", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("Local", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("LoCal", AttachmentType.class), equalTo(AttachmentType.LOCAL));
}
}

View File

@ -70,7 +70,7 @@ public class HaloUtilsTest {
assertThat(pluralizedFormat, equalTo("2 chances"));
pluralizedFormat = HaloUtils.pluralize(0, label, pluralLabel);
assertThat(pluralizedFormat, equalTo("no chance"));
assertThat(pluralizedFormat, equalTo("no chances"));
// Test random positive time
IntStream.range(0, 10000).forEach(i -> {
@ -83,7 +83,7 @@ public class HaloUtilsTest {
IntStream.range(0, 10000).forEach(i -> {
long time = (-1) * RandomUtils.nextLong();
String result = HaloUtils.pluralize(time, label, pluralLabel);
assertThat(result, equalTo("no " + label));
assertThat(result, equalTo("no " + pluralLabel));
});
}