public void FindByUniqueName_Should_Return_Correct_Story()
        {
            Stories.Add(CreateStory() as Story);

            var uniqueName = Stories[0].UniqueName;
            var story      = _storyRepository.FindByUniqueName(uniqueName);

            Assert.Equal(uniqueName, story.UniqueName);
        }
Esempio n. 2
0
        public void FindByUniqueName_Should_Return_Correct_Story()
        {
            using (BeginTransaction())
            {
                var story = CreateNewStory();
                _storyRepository.Add(story);
                _database.SubmitChanges();

                var uniqueName = story.UniqueName;
                var foundStory = _storyRepository.FindByUniqueName(uniqueName);
                Assert.Equal(uniqueName, foundStory.UniqueName);
            }
        }