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:
Wesley Wolfe
2012-12-14 02:02:02 -06:00
parent 53b064ec79
commit 0f4c206f9b
8 changed files with 122 additions and 90 deletions

View File

@@ -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()));
}
}
}