Package org.lilyproject.indexer.model.indexerconf

Examples of org.lilyproject.indexer.model.indexerconf.TypePattern.matches()


public class TypePatternTest {
    @Test
    public void testNameWildcards() throws Exception {
        TypePattern pattern = new TypePattern("STR*");

        assertTrue(pattern.matches("STRING"));
        assertFalse(pattern.matches("STING"));

        pattern = new TypePattern("STR*<STR*>");
        assertTrue(pattern.matches("STRING<STRONG>"));

View Full Code Here


    @Test
    public void testNameWildcards() throws Exception {
        TypePattern pattern = new TypePattern("STR*");

        assertTrue(pattern.matches("STRING"));
        assertFalse(pattern.matches("STING"));

        pattern = new TypePattern("STR*<STR*>");
        assertTrue(pattern.matches("STRING<STRONG>"));

        pattern = new TypePattern("STR*<STR*<*>>");
 
View Full Code Here

        assertTrue(pattern.matches("STRING"));
        assertFalse(pattern.matches("STING"));

        pattern = new TypePattern("STR*<STR*>");
        assertTrue(pattern.matches("STRING<STRONG>"));

        pattern = new TypePattern("STR*<STR*<*>>");
        assertTrue(pattern.matches("STRING<STRONG<LONG>>"));
        assertTrue(pattern.matches("STRING<STRONG>"));

View Full Code Here

        pattern = new TypePattern("STR*<STR*>");
        assertTrue(pattern.matches("STRING<STRONG>"));

        pattern = new TypePattern("STR*<STR*<*>>");
        assertTrue(pattern.matches("STRING<STRONG<LONG>>"));
        assertTrue(pattern.matches("STRING<STRONG>"));

        // wildcards in names will mostly be used for the record type argument for records
        pattern = new TypePattern("RECORD<{namespace}*>");
        assertTrue(pattern.matches("RECORD<{namespace}foo>"));
View Full Code Here

        pattern = new TypePattern("STR*<STR*>");
        assertTrue(pattern.matches("STRING<STRONG>"));

        pattern = new TypePattern("STR*<STR*<*>>");
        assertTrue(pattern.matches("STRING<STRONG<LONG>>"));
        assertTrue(pattern.matches("STRING<STRONG>"));

        // wildcards in names will mostly be used for the record type argument for records
        pattern = new TypePattern("RECORD<{namespace}*>");
        assertTrue(pattern.matches("RECORD<{namespace}foo>"));
        assertFalse(pattern.matches("RECORD<{othernamespace}foo>"));
View Full Code Here

        assertTrue(pattern.matches("STRING<STRONG<LONG>>"));
        assertTrue(pattern.matches("STRING<STRONG>"));

        // wildcards in names will mostly be used for the record type argument for records
        pattern = new TypePattern("RECORD<{namespace}*>");
        assertTrue(pattern.matches("RECORD<{namespace}foo>"));
        assertFalse(pattern.matches("RECORD<{othernamespace}foo>"));
    }

    @Test
    public void testArgumentWildcards() throws Exception {
View Full Code Here

        assertTrue(pattern.matches("STRING<STRONG>"));

        // wildcards in names will mostly be used for the record type argument for records
        pattern = new TypePattern("RECORD<{namespace}*>");
        assertTrue(pattern.matches("RECORD<{namespace}foo>"));
        assertFalse(pattern.matches("RECORD<{othernamespace}foo>"));
    }

    @Test
    public void testArgumentWildcards() throws Exception {
        TypePattern pattern = new TypePattern("LIST<STRING>");
View Full Code Here

    @Test
    public void testArgumentWildcards() throws Exception {
        TypePattern pattern = new TypePattern("LIST<STRING>");

        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LONG>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("FOO"));
View Full Code Here

    @Test
    public void testArgumentWildcards() throws Exception {
        TypePattern pattern = new TypePattern("LIST<STRING>");

        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LONG>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("FOO"));

        // no type arg
View Full Code Here

    public void testArgumentWildcards() throws Exception {
        TypePattern pattern = new TypePattern("LIST<STRING>");

        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LONG>"));
        assertFalse(pattern.matches("LIST"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("FOO"));

        // no type arg
        pattern = new TypePattern("STRING");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.