@@ -0,0 +1,1720 @@
+package org.docksidestage.app.web.signin;%0A%0Aimport org.dbflute.utflute.lastaflute.mock.TestingHtmlData;%0Aimport org.docksidestage.app.web.mypage.MypageAction;%0Aimport org.docksidestage.mylasta.action.HarborMessages;%0Aimport org.docksidestage.unit.UnitHarborTestCase;%0Aimport org.lastaflute.core.message.UserMessages;%0Aimport org.lastaflute.web.response.HtmlResponse;%0Aimport org.lastaflute.web.validation.exception.ValidationErrorException;%0A%0A/**%0A * @author jflute%0A */%0Apublic class SigninActionTest extends UnitHarborTestCase %7B%0A%0A    public void test_signin_success() %7B%0A        // ## Arrange ##%0A        SigninAction action = new SigninAction();%0A        inject(action);%0A        SigninForm form = new SigninForm();%0A        form.account = %22Pixy%22;%0A        form.password = %22sea%22;%0A%0A        // ## Act ##%0A        HtmlResponse response = action.signin(form);%0A%0A        // ## Assert ##%0A        TestingHtmlData htmlData = validateHtmlData(response);%0A        htmlData.assertRedirect(MypageAction.class);%0A    %7D%0A%0A    public void test_signin_failure() %7B%0A        // ## Arrange ##%0A        SigninAction action = new SigninAction();%0A        inject(action);%0A        SigninForm form = new SigninForm();%0A        form.account = %22Pixy%22;%0A        form.password = %22land%22;%0A%0A        // ## Act ##%0A        try %7B%0A            action.signin(form);%0A            // ## Assert ##%0A            fail();%0A        %7D catch (ValidationErrorException e) %7B%0A            UserMessages messages = e.getMessages();%0A            assertTrue(messages.hasMessageOf(%22account%22, HarborMessages.ERRORS_LOGIN_FAILURE));%0A            HtmlResponse response = (HtmlResponse) e.getErrorHook().hook();%0A            validateHtmlData(response);%0A            assertNull(form.password);%0A        %7D%0A    %7D%0A%7D%0A

make test_signin_failure()