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>
|
</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>
|
||||||
|
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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));
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue