Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## dtu.library.app
Class TestAddBook

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

    public class TestAddBook

extends java.lang.Object

This class contains tests, testing the functionality of adding books to the library.

Author:
  hub

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 responds false to the login request
  3. The administrator is not logged in to the library application

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD