Clarify NamespacedKey error messages.
Add new tests for NamespacedKeys. By: Senmori <thesenmori@gmail.com>
This commit is contained in:
@@ -29,6 +29,16 @@ public class NamespacedKeyTest {
|
||||
new NamespacedKey("minecraft/test", "foo").toString();
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testInvalidNamespaceCasing() {
|
||||
new NamespacedKey("Minecraft", "foo").toString();
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testInvalidKeyCasing() {
|
||||
new NamespacedKey("minecraft", "Foo").toString();
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testInvalidKey() {
|
||||
new NamespacedKey("minecraft", "foo!").toString();
|
||||
|
||||
Reference in New Issue
Block a user