Package stubs

Examples of stubs.Item


        assertNull(context.getObject("this"));
    }
   
    public void testGETKnownIdReturnsItem() {
        PathInfoParser.setContext("123", context);
        items.put("123", new Item("123", "Frank"));
        rest.GET(context);
        Object object = context.getObject("this");
        assertTrue(object instanceof Item);
        Item item = (Item)object;
        assertEquals("123", item.getId());
        assertEquals("Frank", item.getName());
    }
View Full Code Here


        PathInfoParser.setContext("123", context);
        context.put(MojasefConstants.REQUEST_STREAM, new FileInputStream("src/test/input/item1.xml"));
        rest.PUT(context);
        Object object = context.getObject("this");
        assertTrue(object instanceof Item);
        Item item = (Item)object;
        assertEquals("123", item.getId());
        assertEquals("Margaret", item.getName());
    }
View Full Code Here

        context.remove("success");
        context.remove("this");
        rest.GET(context);
        Object object = context.getObject("this");
        assertTrue(object instanceof Item);
        Item item = (Item)object;
        assertEquals("123", item.getId());
        assertEquals("Margaret", item.getName());
    }
View Full Code Here

        assertEquals("9902", context.get(HTTPConstants.RESPONSE_HEADER + "Location"));
    }
   
    public void testDELETERemovesItem() {
        PathInfoParser.setContext("123", context);
        items.put("123", new Item("123", "Frank"));
        assertNotNull(items.getObject("123"));
        rest.DELETE(context);
        assertNull(items.getObject("123"));
    }
View Full Code Here

TOP

Related Classes of stubs.Item

Copyright © 2018 www.massapicom. 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.