Kawai Wiki

Compare Revisions

Ignore whitespace Rev 186 → Rev 187

/trunk/src/test/java/org/kawai/action/LoginActionTest.java
New file
0,0 → 1,48
package org.kawai.action;
 
import org.junit.Before;
import org.junit.Test;
import org.kawai.dao.UserDAO;
import org.mentawai.util.MockAction;
 
/**
* Test class LoginActionTest.
* @author helio frota
*
*/
public class LoginActionTest {
 
/**
* Attribute action of LoginActionTest.
*/
private LoginAction action;
/**
* Attribute mockAction of LoginActionTest.
*/
private MockAction mockAction;
/**
* Attribute userDAO of LoginActionTest.
*/
private UserDAO userDAO;
 
/**
* Default setUp method.
* @throws Exception
*/
@Before
public void setUp() throws Exception {
action = new LoginAction(userDAO);
mockAction = new MockAction(action);
action.setInput(mockAction.getInput());
action.setOutput(mockAction.getOutput());
}
 
/**
* Test method executeTest.
*/
@Test
public void executeTest() {
action.execute();
}
 
}
/trunk/src/test/java/AllTests.java
1,6 → 1,7
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import org.kawai.action.LoginActionTest;
import org.kawai.model.ModelTest;
 
/**
10,10 → 11,10
*/
@RunWith(value = Suite.class)
@SuiteClasses(value = {
ModelTest.class
ModelTest.class,
LoginActionTest.class
})
public class AllTests {
 
 
 
}