public void CtorNoneOptionTest()
 {
     Assert.Throws <NullReferenceException>(() =>
     {
         _interactor = new InteractorOptionsCell(new DictionaryForOptions(), EItemsOptions.None);
     });
 }
 public void CtorNullDictionaryForOptionsTest()
 {
     Assert.Throws <NullReferenceException>(() =>
     {
         _interactor = new InteractorOptionsCell(null, EItemsOptions.EditContactCell);
     });
 }
Beispiel #3
0
        public PresenterOptionsCell(IViewOptionsCell view, IInteractorOptionsCell interactor, IRouterOptionsCell router, IOptionsCellStyleHolder styleHolder)
        {
            _view                 = view ?? throw new NullReferenceException(nameof(_view));
            _interactor           = interactor ?? throw new NullReferenceException(nameof(_interactor));
            _router               = router ?? throw  new NullReferenceException(nameof(_router));
            _interactor.Presenter = this;
            _view.Presenter       = this;

            _styleHolder = styleHolder;
        }
        public void CellClickTest()
        {
            _presenterMock.Setup(f => f.GoTo(It.IsAny <EItemsOptions>()));

            _interactor           = new InteractorOptionsCell(new DictionaryForOptions(), EItemsOptions.EditContactCell);
            _interactor.Presenter = _presenterMock.Object;
            _interactor.CellClick();

            _presenterMock.Verify(f => f.GoTo(It.IsAny <EItemsOptions>()), Times.Once());
        }
        public void SetConfigSetTextTest()
        {
            _presenterMock.Setup(f => f.SetImage(It.IsAny <string>()));
            _presenterMock.Setup(f => f.SetText(It.IsAny <string>()));

            _interactor           = new InteractorOptionsCell(new DictionaryForOptions(), EItemsOptions.EditContactCell);
            _interactor.Presenter = _presenterMock.Object;
            _interactor.SetConfig();

            _presenterMock.Verify(f => f.SetText(It.IsAny <string>()), Times.Once());
        }