Logo Search packages:      
Sourcecode: maven-repo-helper version File versions

void org::debian::maven::repo::RuleTest::testMatch (  )  [inline]

Test of match method, of class Rule.

Definition at line 17 of file RuleTest.java.

                            {
        Rule simple = new Rule("test");
        assertFalse(simple.match("xxx"));
        assertTrue(simple.match("test"));
        assertFalse(simple.match("test2"));

        Rule simpleReplace = new Rule("s/test/foo/");
        assertFalse(simpleReplace.match("xxx"));
        assertTrue(simpleReplace.match("test"));
        assertFalse(simpleReplace.match("test2"));

        Rule complexReplace = new Rule("s/test(.*)/foo$1/");
        assertFalse(complexReplace.match("xxx"));
        assertTrue(complexReplace.match("test"));
        assertTrue(complexReplace.match("test2"));

        Rule complexReplace2 = new Rule("s/.*/debian/");
        assertTrue(complexReplace2.match("xxx"));
        assertTrue(complexReplace2.match("test"));
        assertTrue(complexReplace2.match("test2"));

        Rule generic = new Rule("*");
        assertTrue(generic.match("xxx"));
        assertTrue(generic.match("test"));
        assertTrue(generic.match("test2"));

        Rule generic2 = new Rule("test*");
        assertFalse(generic2.match("xxx"));
        assertTrue(generic2.match("test"));
        assertTrue(generic2.match("test2"));

    }


Generated by  Doxygen 1.6.0   Back to index