public void MarkAsRead__UpdatesIsRead() { var test = new Tweet(); test. AssertThatChangeNotificationIsRaisedBy(x => x.IsRead). When(test.MarkAsRead); }
public void Archive__UpdatesIsArchived() { var test = new Tweet(); test. AssertThatChangeNotificationIsRaisedBy(x => x.IsArchived). When(test.Archive); }
public void Add_GivenTweet_AddsTweetToDocumentStore() { var test = new TwitterDocumentStore(_documentStoreFactory); var tweet = new Tweet(); test.Add(tweet); _documentSession.Received().Store(tweet); _documentSession.Received().Dispose(); }
public void GetTweet_GivenTweetThatIsInTheStore_ReturnsTheTweet() { var tweet = new Tweet(); string id = "The tweet id"; var test = new TwitterDocumentStore(_documentStoreFactory); _documentSession.Load<Tweet>(id).Returns(tweet); test.GetTweet(id).Should().Be.SameAs(tweet); }
public void GettingIsRead_Initially_IsFalse() { var test = new Tweet(); test.IsRead.Should().Be.False(); }