Esempio n. 1
0
            public void WhenPropertyIsReadOnly_ThenSetProperty()
            {
                _sut.SetPropertyReadOnlyValue("PrivateReadOnly", Value);

                var actual = _sut.GetPropertyValue <string>("PrivateReadOnly");

                Assert.That(actual, Is.EqualTo(Value));
            }
Esempio n. 2
0
            public void WhenPropertyIsWritable_AndIgnoreCase_ThenSetProperty(string propertyName)
            {
                var sut = new DummyWithProperties();

                sut.SetPropertyValue(propertyName.ToLower(), "John", true);

                var actual = sut.GetPropertyValue <string>(propertyName);

                Assert.That(actual, Is.EqualTo("John"));
            }
Esempio n. 3
0
 public void WhenPropertyNameIsNull_ThenThrowException()
 {
     Assert.Throws <ArgumentException>(() => _sut.GetPropertyValue <string>(null));
 }