Esempio n. 1
0
        public void PresenterSetConfigTest()
        {
            _viewMock.Setup(f => f.SetEmailEditTextTheme(It.IsAny <IEditTextTheme>()));
            _stylesHolderMock.SetupGet(f => f.EmailEditTextTheme).Returns(It.IsAny <IEditTextTheme>());
            _viewMock.Setup(f => f.SetHeaderLabelTheme(It.IsAny <ITextViewTheme>()));
            _stylesHolderMock.SetupGet(f => f.HeaderLabelTheme).Returns(It.IsAny <ITextViewTheme>());
            _viewMock.Setup(f => f.SetRecoveryButtonTheme(It.IsAny <IButtonTheme>()));
            _stylesHolderMock.SetupGet(f => f.RecoveryButtonTheme).Returns(It.IsAny <IButtonTheme>());
            _viewMock.Setup(f => f.SetLogoImageViewTheme(It.IsAny <IImageViewTheme>()));
            _stylesHolderMock.SetupGet(f => f.LogoImageViewTheme).Returns(It.IsAny <IImageViewTheme>());
            _viewMock.Setup(f => f.SetViewTheme(It.IsAny <IImageViewTheme>()));
            _stylesHolderMock.SetupGet(f => f.ViewTheme).Returns(It.IsAny <IImageViewTheme>());
            _viewMock.Setup(f => f.SetBackButtonTheme(It.IsAny <IImageButtonTheme>()));
            _stylesHolderMock.SetupGet(f => f.BackButtonTheme).Returns(It.IsAny <IImageButtonTheme>());
            _viewMock.Setup(f => f.SetEmailLabelTheme(It.IsAny <ITextViewTheme>()));
            _stylesHolderMock.SetupGet(f => f.EmailLabelTheme).Returns(It.IsAny <ITextViewTheme>());

            var presenter = new PresenterForgotPass(_viewMock.Object, _interactorMock.Object, _routerMock.Object,
                                                    DataService.RepositoryController.RepositoryRA.LangRA, _stylesHolderMock.Object);

            presenter.SetConfig();

            _viewMock.Verify(f => f.SetEmailEditTextTheme(It.IsAny <IEditTextTheme>()), Times.AtLeastOnce);
            _viewMock.Verify(f => f.SetHeaderLabelTheme(It.IsAny <ITextViewTheme>()), Times.Once);
            _viewMock.Verify(f => f.SetRecoveryButtonTheme(It.IsAny <IButtonTheme>()), Times.Once);
            _viewMock.Verify(f => f.SetLogoImageViewTheme(It.IsAny <IImageViewTheme>()), Times.Once);
            _viewMock.Verify(f => f.SetViewTheme(It.IsAny <IImageViewTheme>()), Times.Once);
            _viewMock.Verify(f => f.SetBackButtonTheme(It.IsAny <IImageButtonTheme>()));
            _viewMock.Verify(f => f.SetEmailLabelTheme(It.IsAny <ITextViewTheme>()));
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            var interactor = new InteractorForgotPass(new ValidationRA(), new ForgotPassController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseRecoveryPassword));
            var presenter  = new PresenterForgotPass(_forgotPassView, interactor, new RouterForgotPass(this), DataService.RepositoryController.RepositoryRA.LangRA,
                                                     new ForgotPassStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser));

            presenter.SetConfig();
        }
Esempio n. 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Window.RequestFeature(WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.ForgotPassActivity);

            InitStatusBar();

            SetConfig();

            _view = FindViewById <ForgotPassView>(Resource.Id.forgot_view);

            _interactor = new InteractorForgotPass(new ValidationRA(), new ForgotPassController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseRecoveryPassword));
            var presenter = new PresenterForgotPass(_view, _interactor, new RouterForgotPass(this), DataService.RepositoryController.RepositoryRA.LangRA,
                                                    new ForgotPassStylesHolderDroid <GlobalControlsTheme>(DroidDAL.ThemeParser));

            presenter.SetConfig();
        }