Exemple #1
0
        public void LoadsSameInstanceWhenUsingFindByID()
        {
            // Arrange.
            var post = BlogPost.Create(new BlogPost
            {
                DatePublished = DateTime.Now,
                Title         = "My Blog Post",
                Text          = "Some text"
            });

            // Act.
            var result = BlogPost.Find(post.ID);

            // Assert.
            Assert.That(ReferenceEquals(post, result), Is.True);
        }