geforkt von Mirrors/Paper
SPIGOT-4818: Unit test banner patterns
Dieser Commit ist enthalten in:
Ursprung
ea5d868cf9
Commit
d7d28b1244
33
src/test/java/org/bukkit/block/banner/PatternTypeTest.java
Normale Datei
33
src/test/java/org/bukkit/block/banner/PatternTypeTest.java
Normale Datei
@ -0,0 +1,33 @@
|
||||
package org.bukkit.block.banner;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import net.minecraft.server.EnumBannerPatternType;
|
||||
import org.bukkit.support.AbstractTestingBase;
|
||||
import org.junit.Test;
|
||||
|
||||
public class PatternTypeTest extends AbstractTestingBase {
|
||||
|
||||
@Test
|
||||
public void testToBukkit() {
|
||||
for (EnumBannerPatternType nms : EnumBannerPatternType.values()) {
|
||||
PatternType bukkit = PatternType.getByIdentifier(nms.b());
|
||||
|
||||
Assert.assertNotNull("No Bukkit banner for " + nms + " " + nms.b(), bukkit);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToNMS() {
|
||||
for (PatternType bukkit : PatternType.values()) {
|
||||
EnumBannerPatternType found = null;
|
||||
for (EnumBannerPatternType nms : EnumBannerPatternType.values()) {
|
||||
if (bukkit.getIdentifier().equals(nms.b())) {
|
||||
found = nms;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Assert.assertNotNull("No NMS banner for " + bukkit + " " + bukkit.getIdentifier(), found);
|
||||
}
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren