コード例 #1
0
 @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());
 }
コード例 #2
0
 @Test
 public void xmlUserInstanceShouldContainUrlAttribute() throws Exception {
   final User u = helper.getXmlResponse("/user/id/1", User.class);
   assertEquals(helper.getBaseUrl() + "/user/id/1", u.getUrl());
 }
コード例 #3
0
 @Test
 public void userResourceShouldReturnXmlUserForUserUrlWithNick() throws Exception {
   final User u = helper.getXmlResponse("/user/nick/wimplash", User.class);
   assertEquals(new Integer(1), u.getId());
 }