package org.appfuse.model;

import junit.framework.TestCase;


// JUnitDoclet end import

/**
 * Generated by JUnitDoclet, a tool provided by
 * ObjectFab GmbH under LGPL.
 * Please see www.junitdoclet.org, www.gnu.org
 * and www.objectfab.de for informations about
 * the tool, the licence and the authors.
 */
public class RoleTest extends TestCase
// JUnitDoclet end extends_implements
 {
    //~ Instance fields ========================================================

    // JUnitDoclet begin class
    org.appfuse.model.UserRole role = null;

    //~ Constructors ===========================================================

    // JUnitDoclet end class
    public RoleTest(String name) {
        // JUnitDoclet begin method RoleTest
        super(name);

        // JUnitDoclet end method RoleTest
    }

    //~ Methods ================================================================

    public org.appfuse.model.UserRole createInstance()
    throws Exception {
        // JUnitDoclet begin method testcase.createInstance
        return new org.appfuse.model.UserRole();

        // JUnitDoclet end method testcase.createInstance
    }

    protected void setUp() throws Exception {
        // JUnitDoclet begin method testcase.setUp
        super.setUp();
        role = createInstance();

        // JUnitDoclet end method testcase.setUp
    }

    protected void tearDown() throws Exception {
        // JUnitDoclet begin method testcase.tearDown
        role = null;
        super.tearDown();

        // JUnitDoclet end method testcase.tearDown
    }

    public void testSetGetId() throws Exception {
        // JUnitDoclet begin method setId getId
        java.lang.Long[] tests =
        {
            new Long(Long.MIN_VALUE), new Long(-1), new Long(0), new Long(1),
            new Long(Long.MAX_VALUE), null
        };

        for (int i = 0; i < tests.length; i++) {
            role.setId(tests[i]);
            assertEquals(tests[i], role.getId());
        }

        // JUnitDoclet end method setId getId
    }

    public void testSetGetUsername() throws Exception {
        // JUnitDoclet begin method setUsername getUsername
        java.lang.String[] tests =
        { "", " ", "a", "A", "ä", "ß", "0123456789", "012345678901234567890", "\n", null };

        for (int i = 0; i < tests.length; i++) {
            role.setUsername(tests[i]);
            assertEquals(tests[i], role.getUsername());
        }

        // JUnitDoclet end method setUsername getUsername
    }

    public void testSetGetRolename() throws Exception {
        // JUnitDoclet begin method setRolename getRolename
        java.lang.String[] tests =
        { "", " ", "a", "A", "ä", "ß", "0123456789", "012345678901234567890", "\n", null };

        for (int i = 0; i < tests.length; i++) {
            role.setRoleName(tests[i]);
            assertEquals(tests[i], role.getRoleName());
        }

        // JUnitDoclet end method setRolename getRolename
    }

    /**
     * JUnitDoclet moves marker to this method, if there is not match
     * for them in the regenerated code and if the marker is not empty.
     * This way, no test gets lost when regenerating after renaming.
     * Method testVault is supposed to be empty.
     */
    public void testVault() throws Exception {
        // JUnitDoclet begin method testcase.testVault
        // JUnitDoclet end method testcase.testVault
    }

    public static void main(String[] args) {
        // JUnitDoclet begin method testcase.main
        junit.textui.TestRunner.run(RoleTest.class);

        // JUnitDoclet end method testcase.main
    }
}