mirror of https://github.com/halo-dev/halo
Fix test errors and comment build.testResources in pom.xml
parent
717e5b25b4
commit
ed8d86f2bd
10
pom.xml
10
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
});
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue