summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/bukkit/metadata/MetadataStoreTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/metadata/MetadataStoreTest.java b/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
index 255324b5..f35d5be4 100644
--- a/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
+++ b/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
@@ -105,6 +105,13 @@ public class MetadataStoreTest {
assertEquals(1, subject.getMetadata("subject", "key").size());
assertEquals(10, subject.getMetadata("subject", "key").get(0).value());
}
+
+ @Test
+ public void testHasMetadata() {
+ subject.setMetadata("subject", "key", new FixedMetadataValue(pluginX, 10));
+ assertTrue(subject.hasMetadata("subject", "key"));
+ assertFalse(subject.hasMetadata("subject", "otherKey"));
+ }
private class StringMetadataStore extends MetadataStoreBase<String> implements MetadataStore<String> {
@Override