public void CtorNullTest()
 {
     Assert.Throws <NullReferenceException>(() =>
     {
         _interactor = new InteractorProfileCell("id", null);
     });
 }
Beispiel #2
0
 public void ConstructorNegativeTest(IProfileCellView view, IInteractorProfileCell interactor, IProfileCellStylesHolder themes, IProfileCellLocale locale, string testName)
 {
     Assert.Throws(typeof(ArgumentNullException), () =>
     {
         var presenter = new PresenterProfileCell(view, interactor, themes, locale);
     });
 }
Beispiel #3
0
 public void SetData(EItemsOptions data)
 {
     _interactor           = new InteractorProfileCell(DataService.RepositoryController.RepositoryUser.UserId, new OptionsProfileController(DataService.RepositoryController.RepositoryUserAuth));
     _presenter            = new PresenterProfileCell(_profileCellView, _interactor, new ProfileCellStylesHolderDroid <GlobalControlsTheme>(DroidDAL.ThemeParser), DataService.RepositoryController.RepositoryMoreOptions.LangMoreOptions);
     _interactor.Presenter = _presenter;
     _presenter.SetConfig();
     _interactor.SendRequestForUserData();
 }
        public PresenterProfileCell(IProfileCellView view, IInteractorProfileCell interactor, IProfileCellStylesHolder themes, IProfileCellLocale locale)
        {
            _view       = view ?? throw new ArgumentNullException("View cannot be a null!");
            _interactor = interactor ?? throw new ArgumentNullException("Interactor cannot be a null!");

            _themeHolder = themes;
            _locale      = locale;
        }
        public void FillUserDataTest()
        {
            _presenterMock.Setup(f => f.SetAvatar(It.IsAny <string>()));
            _presenterMock.Setup(f => f.SetName(It.IsAny <string>()));

            _interactor = new InteractorProfileCell("id", new OptionsProfileController(_repo))
            {
                Presenter = _presenterMock.Object
            };
            _interactor.SendRequestForUserData();

            _presenterMock.Verify(f => f.SetAvatar(It.IsAny <string>()), Times.Once);
            _presenterMock.Verify(f => f.SetName(It.IsAny <string>()), Times.Once);
        }
 public void CtorTest()
 {
     _interactor = new InteractorProfileCell("id", _controller);
 }
Beispiel #7
0
 public void ConstructorPositiveTest(IProfileCellView view, IInteractorProfileCell interactor, IProfileCellStylesHolder themes, IProfileCellLocale locale, string testName)
 {
     var presenter = new PresenterProfileCell(view, interactor, themes, locale);
 }