diff --git a/OlympusServices/.idea/caches/build_file_checksums.ser b/OlympusServices/.idea/caches/build_file_checksums.ser index 4c7ae2c..c647582 100644 Binary files a/OlympusServices/.idea/caches/build_file_checksums.ser and b/OlympusServices/.idea/caches/build_file_checksums.ser differ diff --git a/OlympusServices/app/src/androidTest/java/com/uottawa/olympus/olympusservices/LogInTest.java b/OlympusServices/app/src/androidTest/java/com/uottawa/olympus/olympusservices/LogInTest.java index 6828df5..0487845 100644 --- a/OlympusServices/app/src/androidTest/java/com/uottawa/olympus/olympusservices/LogInTest.java +++ b/OlympusServices/app/src/androidTest/java/com/uottawa/olympus/olympusservices/LogInTest.java @@ -17,7 +17,6 @@ public class LogInTest { @Test public void checkSignIn() throws Exception{ - //Lalala } } \ No newline at end of file diff --git a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/AdminTest.java b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/AdminTest.java index 2eabc9d..38008b6 100644 --- a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/AdminTest.java +++ b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/AdminTest.java @@ -6,6 +6,10 @@ import static org.junit.Assert.*; public class AdminTest { + /** + * Initiates an Admin account and tests if the strings match to the required inputs. + */ + @Test public void testAdmin() { Admin admin = new Admin(); diff --git a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/HomeOwnerTest.java b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/HomeOwnerTest.java index 1453b21..47d33a8 100644 --- a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/HomeOwnerTest.java +++ b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/HomeOwnerTest.java @@ -6,6 +6,10 @@ import static org.junit.Assert.*; public class HomeOwnerTest { + /** + * Initiates an Homeowner account and tests if the random strings match to the required inputs. + */ + @Test public void testHomeOwner(){ UserType user = new HomeOwner( "John123", "1234567890", "John", "Doe" ); diff --git a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceProviderTest.java b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceProviderTest.java index d28fc45..ab776d1 100644 --- a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceProviderTest.java +++ b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceProviderTest.java @@ -10,6 +10,10 @@ public class ServiceProviderTest { ServiceProvider serviceprovider = new ServiceProvider("John123", "1234567890", "John", "Doe"); + /** + * Initiates an ServiceProvider account and tests if the random strings match to the required inputs. + */ + @Test public void testServiceProvider() { assertEquals( "John123", serviceprovider.getUsername() ); @@ -27,13 +31,18 @@ public class ServiceProviderTest { assertNotEquals("Doe", serviceprovider.getLastname()); } + /** + * adds services and tests if they match the requirements in order to function properly. Example: If a service has a same name it doesn't count as one. + * + */ + @Test public void addServiceTest() { serviceprovider.addService( new Service( "KitchenCleaner", 50 ) ); serviceprovider.addService( new Service( "FrenchMaid", 250 ) ); - serviceprovider.addService( new Service( "FrenchMaid", 250 ) ); - serviceprovider.addService( new Service( "SecretService", 150 ) ); + serviceprovider.addService( new Service( "FrenchMaid", 210 ) ); serviceprovider.addService( new Service( "SecretService", 150 ) ); + serviceprovider.addService( new Service( "SecretService", 110 ) ); int numOfServices = serviceprovider.getServices().size(); assertEquals( 3, numOfServices ); } diff --git a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceTest.java b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceTest.java index ea1d487..6402296 100644 --- a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceTest.java +++ b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/ServiceTest.java @@ -7,6 +7,10 @@ import static org.junit.Assert.*; public class ServiceTest { Service service = new Service( "FrenchMaid", 250 ); + /** + * Initiates an Service account and tests if the random strings match to the required inputs. + */ + @Test public void testService(){ assertEquals( "FrenchMaid", service.getName() ); @@ -17,12 +21,18 @@ public class ServiceTest { assertNotEquals( 250, service.getRate()); } + /** + * adds service providers and tests if they match the requirements in order to function properly. Example: If a service has a same name it doesn't count as one. + * + */ + @Test public void addServiceProviderTest(){ service.addServiceProvider( new ServiceProvider( "John123", "1234567890", "John", "Doe" ) ); service.addServiceProvider( new ServiceProvider( "Jane123", "1234567890", "Jane", "Doe" ) ); service.addServiceProvider( new ServiceProvider( "John123", "1234567890", "John", "Doe" ) ); service.addServiceProvider( new ServiceProvider( "Jane123", "1234567890", "Jane", "Doe" ) ); + service.addServiceProvider( new ServiceProvider( "Jane123", "1234567890", "John", "Doe" ) ); int numOfSP = service.getServiceProviders().size(); assertEquals( 2,numOfSP ); } diff --git a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/UserTypeTest.java b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/UserTypeTest.java index 1934f15..12d173d 100644 --- a/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/UserTypeTest.java +++ b/OlympusServices/app/src/test/java/com/uottawa/olympus/olympusservices/UserTypeTest.java @@ -11,6 +11,10 @@ import static org.junit.Assert.*; public class UserTypeTest { + /** + * Tests if the every user that is created is equal to each other or not. + */ + @Test public void userTypeComparaison() { UserType user = new HomeOwner("John123", "1234567890", "John", "Doe");