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