package org.monospark.spongematchers.type;

import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertThat;
import static org.monospark.spongematchers.testutil.HamcrestSpongeMatchers.matches;

import org.junit.Test;
import org.monospark.spongematchers.matcher.SpongeMatcher;
import org.monospark.spongematchers.parser.SpongeMatcherParseException;
import org.monospark.spongematchers.parser.element.StringElementParser;
import org.monospark.spongematchers.type.MatcherType;

public class MatcherTypeTest {

    @Test
    public void parseMatcher_MatcherWithConjunctions_ReturnsCorrectMatcher() throws SpongeMatcherParseException {
        String input = "(('test1'|'test2')&!('test2'))";
        
        SpongeMatcher<String> matcher = MatcherType.STRING.parseMatcher(StringElementParser.parseStringElement(input));
        
        assertThat(matcher, matches("test1"));
        assertThat(matcher, not(matches("test2")));
    }
}

@@ -947,10 +947,397 @@
 ;%0A    %7D%0A
+    %0A    @Test%0A    public void parseMatcher_WildcardMatcher_ReturnsCorrectMatcher() throws SpongeMatcherParseException %7B%0A        String input = %22*%22;%0A        %0A        SpongeMatcher%3CString%3E matcher = MatcherType.STRING.parseMatcher(StringElementParser.parseStringElement(input));%0A        %0A        assertThat(matcher, matches(%22test1%22));%0A        assertThat(matcher, matches(%22test2%22));%0A    %7D%0A
 %7D%0A

Add a test method to test wildcard matcher parsing