dtu.library.app
Class TestAddBook

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

public class TestAddBook
extends java.lang.Object


Constructor Summary
TestAddBook()
           
 
Method Summary
 void testAdminAddBook()
          Tests the scenario that the administrator can add a book to the library via the library application.
 void testAdminAddBookNotLoggedIn()
          Tests the scenario when the administrator wants to add a book, but is not logged in.
 void testLogin()
          Tests the scenario when the administrator successfully logs in.
 void testLoginFailed()
          Tests the scenario when the administrator wants to log in with the wrong password.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestAddBook

public TestAddBook()
Method Detail

testLogin

public void testLogin()
Tests the scenario when the administrator successfully logs in.
  1. The administrator logs in with the correct password
  2. The library application knows that the administrator is logged in


testLoginFailed

public void testLoginFailed()
Tests the scenario when the administrator wants to log in with the wrong password.
  1. The administrator logs in with the wrong password
  2. The library app response false to the login request.


testAdminAddBook

public void testAdminAddBook()
                      throws java.lang.Exception
Tests the scenario that the administrator can add a book to the library via the library application.
  1. The administrator has to login with password "adminadmin".
  2. The book to be added is created.
  3. The book is added to the library by calling addBook from the library application.

Throws:
java.lang.Exception

testAdminAddBookNotLoggedIn

public void testAdminAddBookNotLoggedIn()
Tests the scenario when the administrator wants to add a book, but is not logged in.
  1. The book to be added is created.
  2. The book is added to the library by calling addBook from the library application.
  3. The library application throws an exception.