00001 #ifndef DOMAINTEST_H
00002 #define DOMAINTEST_H
00003 
00004 #include "testbench.h"
00005 
00006 #include <domain/taskmanagerdata.h>
00007 
00008 class DomainTest : public TestInterface
00009 {
00010         Q_OBJECT
00011         Q_INTERFACES(TestInterface)
00012 
00013     public:
00014 
00015         QString name() const;
00016 
00017     private:
00018 
00019         domain::TaskManagerData* taskManagerData;
00020 
00021     private slots:
00022 
00023         void initTestCase();
00024         void cleanupTestCase();
00025         void init();
00026         void cleanup();
00027 
00028         
00029         void testDurationValid();
00030         void testDurationInvalid();
00031         void testDurationTotalSecs();
00032         void testDurationEquals();
00033         void testDurationNotEquals();
00034         void testDurationGreaterThan();
00035         void testDurationSmallerThan();
00036         void testDurationValid_data();
00037         void testDurationInvalid_data();
00038         void testDurationTotalSecs_data();
00039         void testDurationEquals_data();
00040         void testDurationNotEquals_data();
00041         void testDurationGreaterThan_data();
00042         void testDurationSmallerThan_data();
00043 
00044         
00045         void testScheduleValid();
00046         void testScheduleInvalid();
00047         void testScheduleSetters();
00048         void testScheduleAssignment();
00049         void testScheduleEquals();
00050         void testScheduleValid_data();
00051         void testScheduleInvalid_data();
00052         void testScheduleSetters_data();
00053         void testScheduleAssignment_data();
00054         void testScheduleEquals_data();
00055 
00056         
00057         void testUserType();
00058         void testUserCreation();
00059         void testUserAdmin();
00060         void testUserTasks();
00061 
00062         
00063         void testInvitationValid();
00064         void testInvitationInvalid();
00065 
00066         
00067         void testResourceType();
00068         void testResourceCreation();
00069 
00070         
00071         void testReservationValid();
00072         void testReservationInValid();
00073 
00074         
00075         void testProjectCreation();
00076         void testProjectDescription();
00077         void testProjectTasks();
00078 
00079         
00080         void testTaskType();
00081         void testTaskFields();
00082 
00083         
00084         void testTaskCreation();
00085         void testTaskStates();
00086 
00087         
00088         void testBusinessRule1();
00089         void testBusinessRule2();
00090         void testBusinessRule3();
00091 };
00092 
00093 #endif