Last active
November 26, 2015 17:13
-
-
Save GSala/d2adbd76ea91b6c22fc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final Client client = ClientBuilder.newClient(); | |
private static final WebTarget r = client.target("http://localhost:8080/tg/api/itineraries"); | |
@Test | |
public void testAddHotel(){ | |
HotelType hotel = new HotelType(); | |
hotel.setName("Palacio"); | |
HotelType response = r.path("1/hotels") | |
.request() | |
.accept(MediaType.APPLICATION_XML) | |
.post(Entity.entity(hotel, MediaType.APPLICATION_XML), | |
HotelType.class); | |
assertEquals(hotel.getName(), response.getName()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment