Package models

Examples of models.Rule.matches()


        r.pattern = "a,b ,  pdf,   ";
        assertTrue(r.matches("file.a"));
        assertTrue(r.matches("file.b"));
        assertTrue(r.matches("file.B"));
        assertTrue(r.matches("file.pdf"));
        assertTrue(r.matches("file.PdF"));
        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
View Full Code Here


        assertTrue(r.matches("file.a"));
        assertTrue(r.matches("file.b"));
        assertTrue(r.matches("file.B"));
        assertTrue(r.matches("file.pdf"));
        assertTrue(r.matches("file.PdF"));
        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
View Full Code Here

        assertTrue(r.matches("file.b"));
        assertTrue(r.matches("file.B"));
        assertTrue(r.matches("file.pdf"));
        assertTrue(r.matches("file.PdF"));
        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
View Full Code Here

        assertTrue(r.matches("file.B"));
        assertTrue(r.matches("file.pdf"));
        assertTrue(r.matches("file.PdF"));
        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
        assertFalse(r.matches(".a"));
View Full Code Here

        assertTrue(r.matches("file.pdf"));
        assertTrue(r.matches("file.PdF"));
        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
        assertFalse(r.matches(".a"));
    }
View Full Code Here

        assertTrue(r.matches("file.PdF"));
        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
        assertFalse(r.matches(".a"));
    }
View Full Code Here

        assertFalse(r.matches("file.a,b,c"));
        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
        assertFalse(r.matches(".a"));
    }

    @Test
View Full Code Here

        assertFalse(r.matches("file.txt"));
        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
        assertFalse(r.matches(".a"));
    }

    @Test
    public void testReplace() {
View Full Code Here

        assertFalse(r.matches("file."));
        assertFalse(r.matches("file. "));
        assertFalse(r.matches("file"));
        assertFalse(r.matches("file,tmp"));
        assertFalse(r.matches("file.with spaces"));
        assertFalse(r.matches(".a"));
    }

    @Test
    public void testReplace() {
        User u = UserTest.newUser();
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.