public void When_changing_the_gtalk_status_message_while_not_logged_in() { var googleTalkDataAccessSpy = new TestGoogleTalkDataAccess(); var sut = new AuthenticatedGoogleTalkDataAccess(googleTalkDataAccessSpy); sut.SetAvailableMessage("my status message"); Assert.That(googleTalkDataAccessSpy.AvailableMessageWasSent, Is.False, "It should not set the available message if it has not logged into google talk successfully."); }
public void When_authenticated_after_changing_the_gtalk_status_message_prior_to_being_authenticated() { var googleTalkDataAccessSpy = new TestGoogleTalkDataAccess(); var sut = new AuthenticatedGoogleTalkDataAccess(googleTalkDataAccessSpy); sut.SetAvailableMessage("Status message!"); googleTalkDataAccessSpy.AssumeSuccessfulAuthenticationMessageIsReceivedFromGTalk(); Assert.That(googleTalkDataAccessSpy.AvailableMessageWasSent, "It should have sent a request to change the status message."); }