package demo.action;

import static org.junit.Assert.assertNotNull;
import li.annotation.Inject;
import li.test.ActionTest;

import org.junit.Before;
import org.junit.Test;

import demo.record.Account;

public class AccountActionTest extends ActionTest {
	@Inject
	AccountAction accountAction;
	private Account account = new Account();

	@Before
	public void before() {
		assertNotNull(accountAction);
		account.set("id", "1").set("username", "uname").set("password", "pwd").set("email", "eml").set("status", 1);
	}

	@Test
	public void add() {
		accountAction.add();
	}

	@Test
	public void delete() {
		accountAction.delete(1);
	}

	@Test
	public void edit() {
		accountAction.edit(1);
	}

	@Test
	public void list() {
		accountAction.list(page);
	}

	@Test
	public void loginView() {
		accountAction.login();
	}

	@Test
	public void login() {
		accountAction.login(account);
	}

	@Test
	public void logout() {
		accountAction.logout();
	}

	@Test
	public void save() {
		accountAction.save(account);
	}

	@Test
	public void signupView() {
		accountAction.signup();
	}

	@Test
	public void signup() {
		accountAction.signup(account);
	}

	@Test
	public void update() {
		accountAction.update(account);
	}
}
@@ -1044,32 +1044,76 @@
 ion.save(account
+.set(%22username%22, System.currentTimeMillis())
 );%0D%0A%09%7D%0D%0A%0D%0A%09@Test

更新测试AccountActionTest.save()