Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cppunit/TestCase.h>
- #include <cppunit/Asserter.h>
- #include <cppunit/TestCaller.h>
- #include <cppunit/TestSuite.h>
- #include <cppunit/TestResult.h>
- #include "Process.h"
- class Tests : public CppUnit::TestFixture {
- private:
- Process* p;
- public:
- void setUp()
- {
- p = new Process();
- }
- void tearDown()
- {
- delete p;
- }
- void testCheckPassword()
- {
- CPPUNIT_ASSERT(p->checkPassword("admin0309") == true);
- CPPUNIT_ASSERT(p->checkPassword("efewfwef") == false);
- }
- void testCheckCity()
- {
- CPPUNIT_ASSERT(p->checkCity("Николаев") == true);
- CPPUNIT_ASSERT(p->checkCity("Берлин") == false);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement