public void SetConfigTest() { _stylesHolderMock.SetupGet(f => f.AvatarImageViewTheme).Returns(It.IsAny <IImageViewTheme>()); _stylesHolderMock.SetupGet(f => f.CellBackgroundTheme).Returns(It.IsAny <IViewTheme>()); _stylesHolderMock.SetupGet(f => f.NameLabelTheme).Returns(It.IsAny <ITextViewTheme>()); _stylesHolderMock.SetupGet(f => f.YourProfileLabelTheme).Returns(It.IsAny <ITextViewTheme>()); _profileCellLocale.SetupGet(f => f.YourProfile).Returns(It.IsAny <string>()); _viewMock.Setup(f => f.SetAvatarTheme(It.IsAny <IImageViewTheme>())); _viewMock.Setup(f => f.SetBackgroundTheme(It.IsAny <IViewTheme>())); _viewMock.Setup(f => f.SetNameTheme(It.IsAny <ITextViewTheme>())); _viewMock.Setup(f => f.SetProfileLabelTheme(It.IsAny <ITextViewTheme>())); _viewMock.Setup(f => f.SetProfileLabel(It.IsAny <string>())); var presenter = new PresenterProfileCell(_viewMock.Object, _interactorMock.Object, _stylesHolderMock.Object, _profileCellLocale.Object); presenter.SetConfig(); _viewMock.Verify(f => f.SetConfig(), Times.Once); _viewMock.Verify(f => f.SetAvatarTheme(It.IsAny <IImageViewTheme>()), Times.Once); _viewMock.Verify(f => f.SetBackgroundTheme(It.IsAny <IViewTheme>()), Times.Once); _viewMock.Verify(f => f.SetNameTheme(It.IsAny <ITextViewTheme>()), Times.Once); _viewMock.Verify(f => f.SetProfileLabelTheme(It.IsAny <ITextViewTheme>()), Times.Once); _viewMock.Verify(f => f.SetProfileLabel(It.IsAny <string>()), Times.Once); }
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); }); }
public void SetNameTest(string name) { _viewMock.Setup(f => f.SetName(name)); var presenter = new PresenterProfileCell(_viewMock.Object, _interactorMock.Object, _stylesHolderMock.Object, _profileCellLocale.Object); presenter.SetName(name); _viewMock.Verify(f => f.SetName(name), Times.Once); }
public void ConstructorPositiveTest(IProfileCellView view, IInteractorProfileCell interactor, IProfileCellStylesHolder themes, IProfileCellLocale locale, string testName) { var presenter = new PresenterProfileCell(view, interactor, themes, locale); }