|
@ -16,6 +16,9 @@ public class CustomersTest extends TestCase { |
|
|
assertTrue(nicknameIsAvailable); |
|
|
assertTrue(nicknameIsAvailable); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Register a user only when the given nickname is available. |
|
|
|
|
|
*/ |
|
|
public void test_nicknameIsTaken() { |
|
|
public void test_nicknameIsTaken() { |
|
|
// Given |
|
|
// Given |
|
|
Customers customers = new Customers(); |
|
|
Customers customers = new Customers(); |
|
@ -32,6 +35,9 @@ public class CustomersTest extends TestCase { |
|
|
assertFalse(nicknameIsTaken); |
|
|
assertFalse(nicknameIsTaken); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Register a single user and check whether it worked. |
|
|
|
|
|
*/ |
|
|
public void test_registerSingleUser() { |
|
|
public void test_registerSingleUser() { |
|
|
// Given |
|
|
// Given |
|
|
Customers customers = new Customers(); |
|
|
Customers customers = new Customers(); |
|
@ -90,6 +96,9 @@ public class CustomersTest extends TestCase { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Test if deletion of an allready registered customer works. |
|
|
|
|
|
*/ |
|
|
public void test_removeRegisteredUser() { |
|
|
public void test_removeRegisteredUser() { |
|
|
// Given |
|
|
// Given |
|
|
Customers customers = new Customers(); |
|
|
Customers customers = new Customers(); |
|
@ -107,6 +116,9 @@ public class CustomersTest extends TestCase { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Register a given number of users. |
|
|
|
|
|
*/ |
|
|
public void test_registerAndCountUsers() { |
|
|
public void test_registerAndCountUsers() { |
|
|
// Given |
|
|
// Given |
|
|
Customers customers = new Customers(); |
|
|
Customers customers = new Customers(); |
|
@ -123,6 +135,9 @@ public class CustomersTest extends TestCase { |
|
|
assertEquals(expectedRegisteredUsers, actualRegisteredUsers); |
|
|
assertEquals(expectedRegisteredUsers, actualRegisteredUsers); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Check if the Registration of a User works as intended. |
|
|
|
|
|
*/ |
|
|
public void test_createRegisterAndCheckUserData() { |
|
|
public void test_createRegisterAndCheckUserData() { |
|
|
// Given |
|
|
// Given |
|
|
Customers customers = new Customers(); |
|
|
Customers customers = new Customers(); |
|
|