@@ -0,0 +1,2061 @@
+package org.monospark.spongematchers.type;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.not;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0Aimport static org.monospark.spongematchers.testutil.HamcrestSpongeMatchers.matches;%0A%0Aimport org.junit.Test;%0Aimport org.monospark.spongematchers.matcher.SpongeMatcher;%0Aimport org.monospark.spongematchers.parser.SpongeMatcherParseException;%0Aimport org.monospark.spongematchers.parser.element.StringElement;%0Aimport org.monospark.spongematchers.parser.element.StringElementParser;%0Aimport org.spongepowered.api.data.meta.ItemEnchantment;%0Aimport org.spongepowered.api.item.Enchantment;%0A%0Apublic class ItemEnchantmentTypeTest %7B%0A%0A    @Test%0A    public void canMatch_NonItemEnchantmentObject_ReturnsFalse() throws SpongeMatcherParseException %7B%0A        Object o = 5;%0A        %0A        boolean canMatch = MatcherType.ITEM_ENCHANTMENT.canMatch(o);%0A        %0A        assertThat(canMatch, is(false));%0A    %7D%0A    %0A    @Test%0A    public void canMatch_ItemEnchantmentObject_ReturnsTrue() throws SpongeMatcherParseException %7B%0A        Object o = new ItemEnchantment(mock(Enchantment.class), 2);%0A        %0A        boolean canMatch = MatcherType.ITEM_ENCHANTMENT.canMatch(o);%0A        %0A        assertThat(canMatch, is(true));%0A    %7D%0A%0A    @Test%0A    public void parseMatcher_ValidMapElement_ReturnsCorrectSpongeMatcher() throws SpongeMatcherParseException %7B%0A        StringElement element = StringElementParser.parseStringElement(%0A                %22%7B'id':'minecraft:.+','level':2%7D%22);%0A%0A        SpongeMatcher%3CItemEnchantment%3E matcher = MatcherType.ITEM_ENCHANTMENT.parseMatcher(element);%0A%0A        Enchantment enchantment = mock(Enchantment.class);%0A        when(enchantment.getId()).thenReturn(%22minecraft:test%22);%0A        ItemEnchantment e1 = new ItemEnchantment(enchantment, 2);%0A        assertThat(matcher, matches(e1));%0A        ItemEnchantment e2 = new ItemEnchantment(enchantment, 1);%0A        assertThat(matcher, not(matches(e2)));%0A    %7D%0A%7D%0A

Add ItemEnchantment matcher tests