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> </dependencies>
<build> <build>
<testResources> <!--<testResources>-->
<testResource> <!--<testResource>-->
<directory>${basedir}/src/main/resources</directory> <!--<directory>${basedir}/src/main/resources</directory>-->
</testResource> <!--</testResource>-->
</testResources> <!--</testResources>-->
<plugins> <plugins>
<!-- Spring Boot plugin --> <!-- Spring Boot plugin -->
<plugin> <plugin>

View File

@ -24,9 +24,9 @@ public class AttachmentTypeTest {
@Test @Test
public void conversionTest() { public void conversionTest() {
assertThat(conversionService.convert("SERVER", AttachmentType.class), equalTo(AttachmentType.LOCAL)); assertThat(conversionService.convert("LOCAL", 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("Server", AttachmentType.class), equalTo(AttachmentType.LOCAL)); assertThat(conversionService.convert("Local", AttachmentType.class), equalTo(AttachmentType.LOCAL));
assertThat(conversionService.convert("SerVer", 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")); assertThat(pluralizedFormat, equalTo("2 chances"));
pluralizedFormat = HaloUtils.pluralize(0, label, pluralLabel); pluralizedFormat = HaloUtils.pluralize(0, label, pluralLabel);
assertThat(pluralizedFormat, equalTo("no chance")); assertThat(pluralizedFormat, equalTo("no chances"));
// Test random positive time // Test random positive time
IntStream.range(0, 10000).forEach(i -> { IntStream.range(0, 10000).forEach(i -> {
@ -83,7 +83,7 @@ public class HaloUtilsTest {
IntStream.range(0, 10000).forEach(i -> { IntStream.range(0, 10000).forEach(i -> {
long time = (-1) * RandomUtils.nextLong(); long time = (-1) * RandomUtils.nextLong();
String result = HaloUtils.pluralize(time, label, pluralLabel); String result = HaloUtils.pluralize(time, label, pluralLabel);
assertThat(result, equalTo("no " + label)); assertThat(result, equalTo("no " + pluralLabel));
}); });
} }