public void GetValue_ShouldReturnValueOfProperty()
        {
            var expected = "Expected";
            var entity = new SimpleTestEntity(){ StringProperty = expected};

            var setter = new PropertyPropertySetter(StringProperty);

            Assert.Equal(expected, setter.GetValue(entity));
        }
        public void SetValue_ShouldApplyValueToInstance()
        {
            var entity = new SimpleTestEntity();

            var setter = new PropertyPropertySetter(StringProperty);

            setter.SetValue(entity, "Test Value");

            Assert.Equal("Test Value", entity.StringProperty);
        }
 public void PropertyType_ShouldReturnPropertyTypeOfProperty()
 {
     var setter = new PropertyPropertySetter(StringProperty);
     Assert.Equal(typeof(string), setter.PropertyType);
 }
 public void Name_ShouldReturnNameOfProperty()
 {
     var setter = new PropertyPropertySetter(StringProperty);
     Assert.Equal("StringProperty", setter.Name);
 }
        public void HasPublicSetter_ShouldBeTrue_WhenSetterIsPublic()
        {
            var setter = new PropertyPropertySetter(StringProperty);

            Assert.True(setter.HasPublicSetter);
        }
        public void HasPublicSetter_ShouldBeFalse_WhenThereIsNoSetter()
        {
            var setter = new PropertyPropertySetter(NoSetterProperty);

            Assert.False(setter.HasPublicSetter);
        }
        public void HasPublicSetter_ShouldBeFalse_WhenSetterIsPrivate()
        {
            var setter = new PropertyPropertySetter(PrivateSetterProperty);

            Assert.False(setter.HasPublicSetter);
        }