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