Package org.lilyproject.indexer.model.indexerconf

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


    @Test
    public void testMore() throws Exception {
        // match things and lists of things
        TypePattern pattern = new TypePattern("*,LIST<+>");

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


    public void testMore() throws Exception {
        // match things and lists of things
        TypePattern pattern = new TypePattern("*,LIST<+>");

        assertTrue(pattern.matches("STRING"));
        assertTrue(pattern.matches("DATE"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("STRING<STRING>"));
    }

View Full Code Here

        // match things and lists of things
        TypePattern pattern = new TypePattern("*,LIST<+>");

        assertTrue(pattern.matches("STRING"));
        assertTrue(pattern.matches("DATE"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("STRING<STRING>"));
    }

    @Test
View Full Code Here

        TypePattern pattern = new TypePattern("*,LIST<+>");

        assertTrue(pattern.matches("STRING"));
        assertTrue(pattern.matches("DATE"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("STRING<STRING>"));
    }

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

        assertTrue(pattern.matches("STRING"));
        assertTrue(pattern.matches("DATE"));
        assertTrue(pattern.matches("LIST<STRING>"));
        assertFalse(pattern.matches("LIST<LIST<STRING>>"));
        assertFalse(pattern.matches("STRING<STRING>"));
    }

    @Test
    public void testRoundBracket() throws Exception {
        // Because angle brackets are annoying to write in XML, one can use round brackets too.
View Full Code Here

    @Test
    public void testRoundBracket() throws Exception {
        // Because angle brackets are annoying to write in XML, one can use round brackets too.
        TypePattern pattern = new TypePattern("LIST(LIST(RECORD(*)))");

        assertTrue(pattern.matches("LIST(LIST(RECORD))"));
        assertTrue(pattern.matches("LIST(LIST(RECORD(foobar)))"));
    }
}
View Full Code Here

    public void testRoundBracket() throws Exception {
        // Because angle brackets are annoying to write in XML, one can use round brackets too.
        TypePattern pattern = new TypePattern("LIST(LIST(RECORD(*)))");

        assertTrue(pattern.matches("LIST(LIST(RECORD))"));
        assertTrue(pattern.matches("LIST(LIST(RECORD(foobar)))"));
    }
}
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.