mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 11:15:57 -07:00
Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests from MaterialTest to PerMaterialTest.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package org.bukkit;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.Matchers.hasSize;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -41,7 +40,7 @@ public class ArtTest {
|
||||
arts.remove(subject);
|
||||
}
|
||||
|
||||
assertThat("org.bukkit.Art has too many arts", arts, hasSize(0));
|
||||
assertThat("org.bukkit.Art has too many arts", arts, is(Collections.EMPTY_LIST));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -50,7 +49,7 @@ public class ArtTest {
|
||||
for (Art art : Art.values()) {
|
||||
EnumArt enumArt = CraftArt.BukkitToNotch(art);
|
||||
assertNotNull(art.name(), enumArt);
|
||||
assertThat(art.name(), cache.put(enumArt, art), is((Art) null));
|
||||
assertThat(art.name(), cache.put(enumArt, art), is(nullValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +59,7 @@ public class ArtTest {
|
||||
for (EnumArt enumArt : EnumArt.values()) {
|
||||
Art art = CraftArt.NotchToBukkit(enumArt);
|
||||
assertNotNull(enumArt.name(), art);
|
||||
assertThat(enumArt.name(), cache.put(art, enumArt), is((EnumArt) null));
|
||||
assertThat(enumArt.name(), cache.put(art, enumArt), is(nullValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user