Beispiel #1
0
        public void Existing_Object_Mapped()
        {
            var content = new PublishedContentMock();

            var value = "Hello world";
            var model = new MyBaseModel()
            {
                MyProperty1 = value,
                MyProperty2 = value
            };

            content.As(instance: model);

            Assert.That(model.MyProperty1, Is.Not.EqualTo(value));
            Assert.That(model.MyProperty2, Is.EqualTo(value));
        }
        public void Existing_Object_Mapped()
        {
            var content = new PublishedContentMock();

            var value = "Hello world";
            var model = new MyBaseModel()
            {
                MyProperty1 = value,
                MyProperty2 = value
            };

            content.As(instance: model);

            Assert.That(model.MyProperty1, Is.Not.EqualTo(value));
            Assert.That(model.MyProperty2, Is.EqualTo(value));
        }