Ejemplo n.º 1
0
        public void ClientSaveBundle_EntityAspect_ChangeValue_Test()
        {
            var originalUrl = "www.oldUrl.com";
            var newUrl      = "www.newUrl.com";
            var blog        = new Blog {
                Url = originalUrl
            };
            var blogEntityAspect = new EntityAspect(blog, EntityState.Added);

            blogEntityAspect.ChangeValue("Url", newUrl);
            blog.Url.Should().Be(newUrl);
            blogEntityAspect.OriginalValuesMap.Should()
            .Contain(KeyValuePair.Create("Url", originalUrl as object));
        }