public void CheckLikedState_Errors(EPostSocialResponseStatus responseState) { _viewMock.Setup(f => f.ShowAlert(It.IsAny <string>(), It.IsAny <string>())); _localeStrings.SetupGet(f => f.LikeError).Returns(It.IsAny <string>()); var presenter = new PresenterPostSocial(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _localeStrings.Object, _stylesHolderMock.Object); presenter.CheckLikedState(responseState); _viewMock.Verify(f => f.ShowAlert(It.IsAny <string>(), It.IsAny <string>()), Times.Once); }
public void CheckLikedState_Success(EPostSocialResponseStatus responseState) { _viewMock.Setup(f => f.SetLikeText(It.IsAny <string>())); _localeStrings.SetupGet(f => f.Like).Returns(It.IsAny <string>()); _interactorMock.Setup(f => f.GetLikeCount()).Returns(It.IsAny <int>()); _interactorMock.Setup(f => f.GetIsLiked()).Returns(true); _stylesHolderMock.SetupGet(f => f.LikeTheme).Returns(It.IsAny <IButtonTheme>()); _viewMock.Setup(f => f.SetLikeDrawable(It.IsAny <IButtonTheme>())); var presenter = new PresenterPostSocial(_viewMock.Object, _interactorMock.Object, _routerMock.Object, _localeStrings.Object, _stylesHolderMock.Object); presenter.CheckLikedState(responseState); _viewMock.Verify(f => f.SetLikeText(It.IsAny <string>()), Times.Once); _interactorMock.Verify(f => f.GetIsLiked(), Times.Once); _stylesHolderMock.VerifyGet(f => f.LikeTheme, Times.Once); _viewMock.Verify(f => f.SetLikeDrawable(It.IsAny <IButtonTheme>()), Times.Once); }