public void PropertyGetterAllowsNullReturnForNestedNotNullGenericWithMaybeNull() { var sample = new ClassWithGenericNestedClass.NestedNotNull <string>(); var value = sample.NotNullPropertyWithMaybeNull; Assert.Null(value); }
public void AllowsNullOutputForNestedGenericMaybeNullOutArgumentWhenFalse() { var sample = new ClassWithGenericNestedClass.NestedNotNull <string>(); var ret = sample.MaybeNullOutValueWhenFalse(out var result); Assert.False(ret); Assert.Null(result); }
public void PropertyGetterThrowsOnNullReturnForNestedNotNullGenericWithAllowNull() { var sample = new ClassWithGenericNestedClass.NestedNotNull <string>(); Assert.Throws <InvalidOperationException>(() => { var dummy = sample.NotNullPropertyWithAllowNull; }); }
public void PropertySetterThrowsOnNullArgumentForNestedNotNullGenericWithMaybeNull() { var sample = new ClassWithGenericNestedClass.NestedNotNull <string>(); Assert.Throws <ArgumentNullException>(() => sample.NotNullPropertyWithMaybeNull = null); }
public void PropertySetterAllowsNullArgumentForNestedNotNullGenericWithAllowNull() { var sample = new ClassWithGenericNestedClass.NestedNotNull <string>(); sample.NotNullPropertyWithAllowNull = null; }