public void WhenPropertyIsReadOnly_ThenSetProperty() { _sut.SetPropertyReadOnlyValue("PrivateReadOnly", Value); var actual = _sut.GetPropertyValue <string>("PrivateReadOnly"); Assert.That(actual, Is.EqualTo(Value)); }
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")); }
public void WhenPropertyNameIsNull_ThenThrowException() { Assert.Throws <ArgumentException>(() => _sut.GetPropertyValue <string>(null)); }