@Test public void testFindQuestion() { FaqJpaController faqJpaController = new FaqJpaController(); List<Faq> faq = faqJpaController.findQuestion("they"); System.out.println("So Luong Question: " + faq.size()); assertNotNull("Find Question khong thanh cong", faq); }
@Test public void testListAllFAQ() { FaqJpaController faqJpaController = new FaqJpaController(); List<Faq> faq = faqJpaController.listAllFAQ(); System.out.println("So Luong FAQ: " + faq.size()); assertNotNull("lay listAllFAQ khong thanh cong", faq); }
@Test public void testFindFAQById() { FaqJpaController faqJpaController = new FaqJpaController(); Faq faq = faqJpaController.findFAQById(22); assertNotNull("Find FAQID khong thanh cong", faq); }
@Test public void testEditFAQ() { FaqJpaController faqJpaController = new FaqJpaController(); Faq faq = faqJpaController.findFAQById(22); faq.setAnswer("em ten nguyen hung tuyen"); faq.setQuestion("Em ten gi vay em ?"); boolean check = faqJpaController.editFAQ(faq); assertTrue("Update FAQ khong thanh cong", check); }
@Test public void testCreateFAQ() { FaqJpaController faqJpaController = new FaqJpaController(); Faq faq = new Faq(); faq.setAnswer("em ten hoang vu"); faq.setQuestion("Em ten gi vay em ?"); boolean check = faqJpaController.createFAQ(faq); assertTrue("Create FAQ khong thanh cong", check); }