1*835e7239SAndrew Lindesay /* 2*835e7239SAndrew Lindesay * Copyright 2019, Andrew Lindesay <apl@lindesay.co.nz> 3*835e7239SAndrew Lindesay * Distributed under the terms of the MIT License. 4*835e7239SAndrew Lindesay */ 5*835e7239SAndrew Lindesay #ifndef VALIDATION_UTILS_TEST_H 6*835e7239SAndrew Lindesay #define VALIDATION_UTILS_TEST_H 7*835e7239SAndrew Lindesay 8*835e7239SAndrew Lindesay #include "Message.h" 9*835e7239SAndrew Lindesay 10*835e7239SAndrew Lindesay #include <TestCase.h> 11*835e7239SAndrew Lindesay #include <TestSuite.h> 12*835e7239SAndrew Lindesay 13*835e7239SAndrew Lindesay 14*835e7239SAndrew Lindesay class ValidationUtilsTest : public CppUnit::TestCase { 15*835e7239SAndrew Lindesay public: 16*835e7239SAndrew Lindesay ValidationUtilsTest(); 17*835e7239SAndrew Lindesay virtual ~ValidationUtilsTest(); 18*835e7239SAndrew Lindesay 19*835e7239SAndrew Lindesay void TestEmailValid(); 20*835e7239SAndrew Lindesay void TestEmailInvalidNoAt(); 21*835e7239SAndrew Lindesay void TestEmailInvalidNoMailbox(); 22*835e7239SAndrew Lindesay void TestEmailInvalidNoDomain(); 23*835e7239SAndrew Lindesay void TestEmailInvalidTwoAts(); 24*835e7239SAndrew Lindesay 25*835e7239SAndrew Lindesay void TestNicknameValid(); 26*835e7239SAndrew Lindesay void TestNicknameInvalid(); 27*835e7239SAndrew Lindesay void TestNicknameInvalidBadChars(); 28*835e7239SAndrew Lindesay 29*835e7239SAndrew Lindesay void TestPasswordClearValid(); 30*835e7239SAndrew Lindesay void TestPasswordClearInvalid(); 31*835e7239SAndrew Lindesay 32*835e7239SAndrew Lindesay static void AddTests(BTestSuite& suite); 33*835e7239SAndrew Lindesay 34*835e7239SAndrew Lindesay }; 35*835e7239SAndrew Lindesay 36*835e7239SAndrew Lindesay 37*835e7239SAndrew Lindesay #endif // VALIDATION_UTILS_TEST_H 38