public void ManageLoginsPresenter_Should_Initialize_A_Object() { var mockedView = new Mock <IManageLoginsView>(); var presenter = new ManageLoginsPresenter(mockedView.Object); Assert.IsInstanceOf <ManageLoginsPresenter>(presenter); }
public void ManageLoginsPresenter_Should_Set_SuccessMessageVisible_To_False() { var mockedView = new Mock <IManageLoginsView>(); mockedView.SetupAllProperties(); mockedView.SetupGet(v => v.GetLoginsCount).Returns(0); var presenter = new ManageLoginsPresenter(mockedView.Object); mockedView.Raise(v => v.Load += null, new EventArgs()); Assert.AreEqual(false, mockedView.Object.SuccessMessageVisible); }
public void ManageLoginsPresenter_Should_Set_CanRemoveExternalLogins_To_True() { var mockedView = new Mock <IManageLoginsView>(); mockedView.SetupAllProperties(); mockedView.SetupGet(v => v.GetLoginsCount).Returns(10); var presenter = new ManageLoginsPresenter(mockedView.Object); mockedView.Raise(v => v.Load += null, new EventArgs()); Assert.AreEqual(true, mockedView.Object.CanRemoveExternalLogins); }