String response=eBookStore.welcomeMessage("Jackson");
assertEquals("Welcome to EBookStore WebService, Mr/Mrs Jackson", response);
}
@Test
public void test2SaveAndTakeBook() throws MalformedURLException {
EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
EBook eBook=new EBook();
eBook.setTitle("The Jungle Book");
eBook.setNumPages(225);
eBook.setPrice(17.9);
eBookStore.saveBook(eBook);
eBook=new EBook();
eBook.setTitle("Animal Farm");
eBook.setNumPages(113);
eBook.setPrice(22.5);
List<String> notes= Arrays.asList(new String[]{"Great book","Not too bad"});
eBook.getNotes().addAll(notes);
eBookStore.saveBook(eBook);
EBook response=eBookStore.takeBook("Animal Farm");
assertEquals(eBook.getNumPages(),response.getNumPages());
assertEquals(eBook.getPrice(),response.getPrice(),0);
assertEquals(eBook.getTitle(),response.getTitle());
assertEquals(notes,response.getNotes());