public void FindByUrl_Should_Return_Correct_Story() { Stories.Add(CreateStory() as Story); var url = Stories[0].Url; var story = _storyRepository.FindByUrl(url); Assert.Equal(url, story.Url); }
public void FindByUrl_Should_Return_Correct_Story() { using (BeginTransaction()) { var story = CreateNewStory(); _storyRepository.Add(story); _database.SubmitChanges(); var url = story.Url; var foundStory = _storyRepository.FindByUrl(url); Assert.Equal(url, foundStory.Url); } }