Commit 95a738cf authored by Alexander's avatar Alexander
Browse files

Add error test for admin

parent 321bdc12
package final_assignment.task_2.tests;
import final_assignment.task_2.Assignment2TestBase;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
* This tests several error-messages
* @author Alexander Sommer
* @since 28.02.2018
public class ErrorTests extends Assignment2TestBase {
* This tests admin functionality
void adminErrors() {
testWithIOFile(getDataFolderDirectory() + "error_tests/");
This tests the admin functionality
Error, empty input
> banana
Error, unknown command.
> add-admin sebastian;stüker;god_of_gbi;modus_ponens
Error, user-name too long
> add-admin sebastian;stüker;god;modus_ponens
Error, user-name too short
> add-admin sebastian;stüker;gbi_god;modus_ponens_is_all_you_need
Error, password too long
> add-admin sebastian;stüker;gbi_god;modus
Error, password too short
> add-admin sebastian;stüker;gbi_god;modus_ponens
> add-admin sebastian;stüker;gbi_god;modus_ponens
Error, this user-name already exists
> login-admin
Error, no parameters
> login-admin gbi_godd;modus_ponens
Error, user doesn't exist
> login-admin gbi_god;modus_ponen
Error, incorrect password
> login-admin gbi_god;modus_ponens
> login-admin gbi_god;modus_ponens
Error, gbi_god is already logged in
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment