コード例 #1
0
 public void CtorRouterNullTest()
 {
     Assert.Throws <ArgumentNullException>(() =>
     {
         _presenter = new AuthPresenter(_interactorMock.Object, _viewMock.Object, null);
     });
 }
コード例 #2
0
 public void Setup()
 {
     _interactorMock = new Mock <IAuthInteractor>(MockBehavior.Strict);
     _viewMock       = new Mock <IAuthView>(MockBehavior.Strict);
     _routerMock     = new Mock <IAuthRouter>(MockBehavior.Strict);
     _presenter      = new AuthPresenter(_interactorMock.Object, _viewMock.Object, _routerMock.Object);
 }
コード例 #3
0
 public LoginForm(MainForm mainForm)
 {
     InitializeComponent();
     _mainForm  = mainForm;
     _router    = new Router(this, _mainForm);
     _request   = new Request();
     _presenter = new AuthPresenter(new AuthInteractor(_request), this, _router);
 }
コード例 #4
0
        public AuthInteractor(IUserDataService service, IAuthPresenter presenter)
        {
            _service = service ?? throw new ArgumentNullException("Provided service is null!");

            _presenter = presenter ?? throw new ArgumentNullException("Provided presenter is null!");
            _presenter.OnLogInAttempt  += Authorization;
            _presenter.OnSignUpAttempt += Registration;
        }
コード例 #5
0
ファイル: MainActivity.cs プロジェクト: GrigorVladislav/TDD
        private void InitAuthPresenter()
        {
            IAuthorizationInteractor interactor = new AuthorizationInteractor(new LoginValidator(), new PasswordValidator());
            IAuthView view = new AuthView(this);

            _authPresenter = new AuthPresenter(interactor, view);
            _authPresenter.Subscribe();
        }
コード例 #6
0
 public void Ctor_NullViewTest()
 {
     Assert.Throws <ArgumentNullException>(() => {
         _authPresenter = new AuthPresenter(_authInteractorMock.Object, null);
     });
 }
コード例 #7
0
 public void Ctor_NullInteractorTest()
 {
     Assert.Throws <ArgumentNullException>(() => {
         _authPresenter = new AuthPresenter(null, _authViewMock.Object);
     });
 }
コード例 #8
0
 public void Setup()
 {
     _authInteractorMock = new Mock <IAuthorizationInteractor>(MockBehavior.Strict);
     _authViewMock       = new Mock <IAuthView>(MockBehavior.Strict);
     _authPresenter      = new AuthPresenter(_authInteractorMock.Object, _authViewMock.Object);
 }