package com.github.neunkasulle.chronocommand.control;

import com.github.neunkasulle.chronocommand.model.Role;
import com.github.neunkasulle.chronocommand.model.UserDAO;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Created by Janze on 06.02.2016.
 */
public class CreateUserControlTest {

    @Before
    public void setUp() throws Exception {
        MainControl mainControl = MainControl.getInstance();


        mainControl.startup(false);
    }

    @Test
    public void testCreateUser() throws Exception {
        CreateUserControl createUserControl;
        UserDAO userDAO = UserDAO.getInstance();

        createUserControl = CreateUserControl.getInstance();

        createUserControl.createUser(new Role("admin"),"Chutulu", "chutulu@eatsyour.soul","1234", " ", null, 999999999);

        assert(userDAO.findUser("Chutulu").getRealname().equals(" "));

    }
}
@@ -700,32 +700,120 @@
 getInstance();%0A%0A
+        Role admin = new Role(%22admin%22);%0A        UserDAO.getInstance().saveRole(admin);%0A%0A
         createUs
@@ -833,33 +833,21 @@
 ateUser(
-new Role(%22
 admin
-%22)
 ,%22Chutul

Fix test case