Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <cppunit/TestCase.h>
  2. #include <cppunit/Asserter.h>
  3. #include <cppunit/TestCaller.h>
  4. #include <cppunit/TestSuite.h>
  5. #include <cppunit/TestResult.h>
  6.  
  7.  
  8. #include "Process.h"
  9.  
  10.  
  11.  
  12. class Tests : public CppUnit::TestFixture {
  13. private:
  14. Process* p;
  15. public:
  16. void setUp()
  17. {
  18. p = new Process();
  19. }
  20.  
  21. void tearDown()
  22. {
  23. delete p;
  24. }
  25.  
  26. void testCheckPassword()
  27. {
  28. CPPUNIT_ASSERT(p->checkPassword("admin0309") == true);
  29. CPPUNIT_ASSERT(p->checkPassword("efewfwef") == false);
  30. }
  31.  
  32. void testCheckCity()
  33. {
  34. CPPUNIT_ASSERT(p->checkCity("Николаев") == true);
  35. CPPUNIT_ASSERT(p->checkCity("Берлин") == false);
  36. }
  37.  
  38.  
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement