Changeset 3677 for trunk/src/test

Show
Ignore:
Timestamp:
05/03/08 22:48:40 (4 years ago)
Author:
michael
Message:

Adding back some converters.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/test/java/org/sarugo/restlet/jpa/URLMappingTests.java

    r3666 r3677  
    6363 
    6464    public void testGetEntityURL() { 
    65         assertEquals("/test/foo/" + foo.id, router.getEntityURL(foo)); 
     65        assertEquals("/test/foo/" + foo.id, app.getEntityURL(foo)); 
    6666        assertEquals("/test/foo/" + foo.id + "/bar/" + bar.id, router 
    6767                .getEntityURL(bar)); 
    6868        Route barRoute = router.attach("/bar/{barId}", BarResource.class); 
    69         assertEquals("/bar/" + bar.id, router.getEntityURL(bar)); 
     69        assertEquals("/bar/" + bar.id, app.getEntityURL(bar)); 
    7070        router.attach("/baz/{barId}", barRoute.getNext()); 
    71         assertEquals("/bar/" + bar.id, router.getEntityURL(bar)); 
     71        assertEquals("/bar/" + bar.id, app.getEntityURL(bar)); 
    7272        router.setBaseRef("http://server/path"); 
    7373        assertEquals("http://server/path/bar/" + bar.id, router 
     
    7676 
    7777    public void testGetEntity() { 
    78         FooEntity foundFoo = (FooEntity) router.getEntity("/test/foo/" + foo.id); 
     78        FooEntity foundFoo = (FooEntity) app.getEntity("/test/foo/" + foo.id); 
    7979        assertEquals(foo.id, foundFoo.id); 
    80         foundFoo = (FooEntity) router.getEntity("/test/foo/" + foo.id + 120485); 
     80        foundFoo = (FooEntity) app.getEntity("/test/foo/" + foo.id + 120485); 
    8181        assertNull(foundFoo); 
    82         foundFoo = (FooEntity) router.getEntity("/test/fool/" + foo.id); 
     82        foundFoo = (FooEntity) app.getEntity("/test/fool/" + foo.id); 
    8383        assertNull(foundFoo); 
    84         BarEntity foundBar = (BarEntity) router.getEntity("/test/foo/" + foo.id 
     84        BarEntity foundBar = (BarEntity) app.getEntity("/test/foo/" + foo.id 
    8585                + "/bar/" + bar.id); 
    8686        assertEquals(bar.id, foundBar.id); 
    8787        Route barRoute = router.attach("/bar/{barId}", BarResource.class); 
    88         foundBar = (BarEntity) router.getEntity("/bar/" + bar.id); 
     88        foundBar = (BarEntity) app.getEntity("/bar/" + bar.id); 
    8989        assertEquals(bar.id, foundBar.id); 
    9090        router.attach("/baz/{barId}", barRoute.getNext()); 
    91         foundBar = (BarEntity) router.getEntity("/baz/" + bar.id); 
     91        foundBar = (BarEntity) app.getEntity("/baz/" + bar.id); 
    9292        assertEquals(bar.id, foundBar.id); 
    9393        router.setBaseRef("http://server/path"); 
    94         foundBar = (BarEntity) router.getEntity("http://server/path/bar/" 
     94        foundBar = (BarEntity) app.getEntity("http://server/path/bar/" 
    9595                + bar.id); 
    9696        assertEquals(bar.id, foundBar.id); 
    97         foundBar = (BarEntity) router.getEntity("/bar/" + bar.id); 
     97        foundBar = (BarEntity) app.getEntity("/bar/" + bar.id); 
    9898        assertEquals(bar.id, foundBar.id); 
    9999    }