@Test public void putShouldCreateAndReturnAnEmptyXmlUser() throws Exception { final User u = helper.putAndGetXmlResponse("/user/id/98", User.class); assertEquals(new Integer(98), u.getId()); assertNull(u.getName()); assertNull(u.getNick()); }
@Test public void xmlUserInstanceShouldContainUrlAttribute() throws Exception { final User u = helper.getXmlResponse("/user/id/1", User.class); assertEquals(helper.getBaseUrl() + "/user/id/1", u.getUrl()); }
@Test public void userResourceShouldReturnXmlUserForUserUrlWithNick() throws Exception { final User u = helper.getXmlResponse("/user/nick/wimplash", User.class); assertEquals(new Integer(1), u.getId()); }