public void WhenConvertingToIConvertibleCompatibleCustomType_ThenSucceeds() { var target = new ConvertibleObject().AsDynamicReflection(); PrivateObject converted = target; Assert.NotNull(converted); }
public void WhenConvertingToIConvertibleIncompatibleCustomType_ThenSucceeds() { var target = new ConvertibleObject().AsDynamicReflection(); ICloneable converted = null; Assert.Throws <RuntimeBinderException>(() => converted = target); }
public void WhenConvertingToIConvertibleCompatibleBuiltInType_ThenSucceeds() { var target = new ConvertibleObject().AsDynamicReflection(); int id = target; Assert.Equal(25, id); }