public void UserAgreementClickTest() { _routerMock.Setup(f => f.ToUserAgreement()); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.UserAgreementClick(); _routerMock.Verify(f => f.ToUserAgreement()); }
public void BackClickTest() { _routerMock.Setup(f => f.ToRegEmail()); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.BackClick(); _routerMock.Verify(f => f.ToRegEmail()); }
public void HideSpinnerTest() { _viewMock.Setup(f => f.HideSpinner()); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.ShowHideSpinner(false); _viewMock.Verify(f => f.HideSpinner(), Times.Once); }
public void AlertOkClickTest() { _routerMock.Setup(f => f.ToAuth()); _interactorMock.Setup(f => f.CleanRepositoryRA()); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.AlertOkClick(); _routerMock.Verify(f => f.ToAuth()); }
public void PasswordInputTest() { _interactorMock.Setup(f => f.PasswordInput(It.IsAny <string>())).Returns(false); _viewMock.Setup(f => f.GetPassword()).Returns(string.Empty); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.PasswordInput(); _interactorMock.Verify(f => f.PasswordInput(It.IsAny <string>()), Times.Once); }
public void CheckRegStateFailTest() { _viewMock.Setup(f => f.ShowRegFail(It.IsAny <string>(), It.IsAny <string>())); _viewMock.Setup(f => f.SetInteractionAvailable()); _interactorMock.Setup(f => f.GetRepository().LangRA.UserDataError).Returns(It.IsAny <string>()); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.RegStateFail(ERegResponseStatus.Error); _viewMock.Verify(f => f.ShowRegFail(It.IsAny <string>(), It.IsAny <string>()), Times.Once); }
public void SaveDataTest() { _interactorMock.Setup(f => f.SaveData(It.IsAny <RegistrationPasswordStrings>())); _viewMock.Setup(f => f.GetPassword()).Returns(string.Empty); _viewMock.Setup(f => f.GetConfirmPassword()).Returns(string.Empty); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.SaveData(); _interactorMock.Verify(f => f.SaveData(It.IsAny <RegistrationPasswordStrings>())); }
public void CheckPasswordStateFailTest() { _stylesHolderMock.SetupGet(f => f.PasswordStateFail).Returns(It.IsAny <IEditTextTheme>()); _viewMock.Setup(f => f.SetPasswordEditTextTheme(null)); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); _viewMock.Setup(f => f.SetPasswordEditTextTheme(null)); presenter.SetPasswordState(EState.Fail); _viewMock.Verify(f => f.SetPasswordEditTextTheme(null), Times.Once); }
public void CheckRegStateSuccessTest() { _viewMock.Setup(f => f.ShowRegSuccess(It.IsAny <string>(), It.IsAny <string>())); _viewMock.Setup(f => f.SetInteractionAvailable()); _interactorMock.Setup(f => f.GetRepository()).Returns(It.IsNotNull <IRepositoryRA>()); _interactorMock.Setup(f => f.GetRepository().LangRA.RegSuccess).Returns(It.IsAny <string>()); _interactorMock.Object.GetRepository().ModelReg = new DataModelReg("", "", "", "", "", "", "", "", "", "", "", new string[] {}); var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.RegStateSuccess(It.IsAny <string>()); _viewMock.Verify(f => f.ShowRegSuccess(It.IsAny <string>(), It.IsAny <string>()), Times.Once); }
public void CheckRegStateAnotherTest(EState state) { var presenter = new PresenterRegPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _stylesHolderMock.Object, _regLocaleStrings); presenter.SetPasswordState(state); }