Exemple #1
0
 @Test
 public void addPostMessage() {
   String s = "new test post";
   String outMes = "Message added\n";
   String res = tester.newPost(s);
   assertEquals(res, outMes);
 }
Exemple #2
0
 @Test
 public void getProductByID() {
   Product p = tester.getProductById("2");
   int id = p.getId();
   assertEquals(id, 2);
 }
Exemple #3
0
 @Test
 public void addProductPostMethod() {
   String res = tester.addP(product);
   String outMes = product.getName() + " was added";
   assertEquals(outMes, res);
 }
Exemple #4
0
 @Test
 public void addProduct() {
   tester.addProduct(product);
   int countProduct = tester.getCount();
   assertEquals(4, countProduct);
 }