Exemple #1
0
        public void Should_set_a_field_when_value_inherits_from_field_type()
        {
            const string fieldName = "abstractField";
            var          newValue  = new ConcreteSampleType();
            var          command   = new SetFieldCommand(_object, fieldName, newValue);

            command.Execute();

            Assert.AreEqual(newValue, _object.abstractField);
        }
        public void Should_set_a_writable_property_when_value_inherits_from_property_type()
        {
            const string propertyName = "AbstractProperty";
            var          newValue     = new ConcreteSampleType();
            var          command      = new SetPropertyCommand(_object, propertyName, newValue);

            command.Execute();

            Assert.AreEqual(newValue, _object.AbstractProperty);
        }