dtu.library.app
Class TestRegisterUser

java.lang.Object
  extended by dtu.library.app.TestRegisterUser

public class TestRegisterUser
extends java.lang.Object


Constructor Summary
TestRegisterUser()
           
 
Method Summary
 void testRegisterUser()
          Tests the registration of a user with an address.
 void testRegisterUserIfNotLoggedIn()
          Tests that it is not allowed to register a user if not logged in as administrator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestRegisterUser

public TestRegisterUser()
Method Detail

testRegisterUser

public void testRegisterUser()
                      throws java.lang.Exception
Tests the registration of a user with an address. For this, the administrator needs to have logged in.
  1. Check that no users are registered
  2. The administrator logs in
  3. A new user with address is created and is registered with the library application
  4. Check that the user is registered

Throws:
java.lang.Exception

testRegisterUserIfNotLoggedIn

public void testRegisterUserIfNotLoggedIn()
                                   throws java.lang.Exception
Tests that it is not allowed to register a user if not logged in as administrator.
  1. Check that the administrator is not logged in
  2. Create a user with an address and register the user
  3. Check that an OperationNotAllowedException is thrown with the correct error message

Throws:
java.lang.Exception