public void SafeNullable_ValueProperty_NotNullInstace_FunctionExecuted() { var notNull = new SafeSubject { ValueProperty = 3 }; Assert.That(notNull.SafeValue(o => o.ValueProperty), Is.EqualTo(3)); }
public void SafeValue_NullableProperty_NotNullInstace_FunctionExecuted() { var notNull = new SafeSubject { NullableProperty = 3 }; Assert.That(notNull.SafeValue(o => o.NullableProperty), Is.EqualTo(3)); // null is a valid proprety value notNull = new SafeSubject { NullableProperty = null }; Assert.That(notNull.SafeValue(o => o.NullableProperty), Is.Null); }
public void SafeValue_NullableProperty_NullInstace_Null() { SafeSubject @null = null; Assert.That(@null.SafeValue(o => o.NullableProperty), Is.Null); }