public void PropertyAccessors_SetPropertiesByValueType_NonExistingValueType() { var testObj = new PropertyAccessorsTestClass(); testObj.SetPropertiesByValueType(true); Assert.Null(testObj.stringProperty1); Assert.Equal("abc", testObj.stringProperty2); Assert.Equal("def", testObj.stringProperty3); Assert.Equal(1, testObj.intProperty1); Assert.Equal(2, testObj.intProperty2); Assert.Equal(3, testObj.intProperty3); }
public void PropertyAccessors_SetPropertiesByValueType_ReplacesExistingValueType() { var testObj = new PropertyAccessorsTestClass(); testObj.SetPropertiesByValueType("ghi"); Assert.Equal("ghi", testObj.stringProperty1); Assert.Equal("ghi", testObj.stringProperty2); Assert.Equal("ghi", testObj.stringProperty3); Assert.Equal(1, testObj.intProperty1); Assert.Equal(2, testObj.intProperty2); Assert.Equal(3, testObj.intProperty3); }