Merge branch 'master' of https://github.com/ebivibe/SEG2105-Olympus
This commit is contained in:
commit
d984df34ae
7 changed files with 33 additions and 3 deletions
Binary file not shown.
|
@ -17,7 +17,6 @@ public class LogInTest {
|
|||
|
||||
@Test
|
||||
public void checkSignIn() throws Exception{
|
||||
//Lalala
|
||||
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue