Beispiel #1
0
    public void SetProperty_UnwritableProperty_DoesNotSetValue()
    {
        var fixture = new ObjectWithAccessProperties();
        var value   = "My value";

        fixture.SetProperty(nameof(fixture.ReadOnlyProperty) + "Other", value);
        Assert.IsNull(fixture.WritableProperty);
    }
Beispiel #2
0
    public void SetProperty_ValidName_SetsValue()
    {
        var fixture  = new ObjectWithAccessProperties();
        var expected = "My value";

        fixture.SetProperty(nameof(fixture.WritableProperty), expected);
        Assert.AreEqual(expected, fixture.WritableProperty);
    }