public void ReadProperties_have_functional_setters() { _DynamicObjectPropertyAccessor.GetAccessor("size").Set(_DynamicObject, 25); dynamic dynamycObject = _DynamicObject; int value = dynamycObject.size; value.Should().Be(25); }
public void DynamicObjectPropertyAccessor_constructor_prioritize_static_over_dynamicProperties() { var ambigeousDynamicObject = new AmbigeousDynamicObject(); var dynamicObjectPropertyAccessor = new DynamicObjectPropertyAccessor(ambigeousDynamicObject); var acessor = dynamicObjectPropertyAccessor.GetAccessor("Ambigeous"); var result = acessor.Get(ambigeousDynamicObject); result.Should().Be("static"); }