summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorrmichela <deltahat@gmail.com>2012-03-28 01:36:36 -0400
committerEvilSeph <evilseph@gmail.com>2012-03-28 19:21:25 -0400
commite9064329e60a5076286f078471b9324175f8f9b7 (patch)
tree53ca24769bb82f6fd2ac1a5ba5846bdfd3a71197 /src/test
parent7ce3a4dbcc727f50989879a951eb673b7535e733 (diff)
downloadbukkit-e9064329e60a5076286f078471b9324175f8f9b7.tar
bukkit-e9064329e60a5076286f078471b9324175f8f9b7.tar.gz
bukkit-e9064329e60a5076286f078471b9324175f8f9b7.tar.lz
bukkit-e9064329e60a5076286f078471b9324175f8f9b7.tar.xz
bukkit-e9064329e60a5076286f078471b9324175f8f9b7.zip
[Bleeding] MetadataBase now properly takes the metadata key into account when computing hasMetadata(). Addresses BUKKIT-1211
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