Package org.bigtesting.routd

Examples of org.bigtesting.routd.RegexRoute.pattern()


    @Test
    public void pattern_NoController_NoAction_NoParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute(null, null, null));
        String expected = "^/$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_NoAction_NoParamPath() {
View Full Code Here


   
    @Test
    public void pattern_WithController_NoAction_NoParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", null, null));
        String expected = "^/cntrl$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_WithAction_NoParamPath() {
View Full Code Here

   
    @Test
    public void pattern_WithController_WithAction_NoParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", "actn", null));
        String expected = "^/cntrl/actn$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_NoController_WithAction_NoParamPath() {
View Full Code Here

   
    @Test
    public void pattern_NoController_WithAction_NoParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute(null, "actn", null));
        String expected = "^/actn$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_WithAction_WithParamPath() {
View Full Code Here

   
    @Test
    public void pattern_WithController_WithAction_WithParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", "actn", "clients/:id"));
        String expected = "^/cntrl/actn/clients/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_NoController_WithAction_WithParamPath() {
View Full Code Here

   
    @Test
    public void pattern_NoController_WithAction_WithParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute(null, "actn", "clients/:id"));
        String expected = "^/actn/clients/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_NoAction_WithParamPath() {
View Full Code Here

   
    @Test
    public void pattern_WithController_NoAction_WithParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", null, "clients/:id"));
        String expected = "^/cntrl/clients/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_NoController_NoAction_WithParamPath() {
View Full Code Here

   
    @Test
    public void pattern_NoController_NoAction_WithParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute(null, null, "clients/:id"));
        String expected = "^/clients/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_WithAction_WithRegexParamPath() {
View Full Code Here

   
    @Test
    public void pattern_WithController_WithAction_WithRegexParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", "actn", "clients/:id<[0-9]+>"));
        String expected = "^/cntrl/actn/clients/([0-9]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_WithAction_WithMultiRegexParamPath() {
View Full Code Here

   
    @Test
    public void pattern_WithController_WithAction_WithMultiRegexParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", "actn", "clients/:id<[0-9]+>/:name"));
        String expected = "^/cntrl/actn/clients/([0-9]+)/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_WithAction_WithRegexSymbols() {
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.