@Test public void shouldGetAllBooksInStock() throws DataNotFoundException, RemoteException { Product[] books = onlineStore.getProductsOfType("Book"); List<Product> booksList = Arrays.asList(books); Assert.assertTrue(booksList.contains(p1)); Assert.assertTrue(booksList.contains(p3)); }
@Test(expected = DataNotFoundException.class) public void shouldThrowDataNotFoundExceptionIfNoProductOfProvidedTypeIsFound() throws DataNotFoundException, RemoteException { onlineStore.getProductsOfType("computer"); }