public void NotNullMethodTwoParameters() { NullPropagatingTestClass foo = new NullPropagatingTestClass(); var val = foo?.MethodTwoParameters(1, 2); AssertEquals(val, 3); }
public void NotNullPropertyReturnInt() { NullPropagatingTestClass foo = new NullPropagatingTestClass(); var val = foo?.Property; AssertEquals(val, 7); }
public void NotNullFieldReturnInt() { NullPropagatingTestClass foo = new NullPropagatingTestClass(); var val = foo?.Field; AssertEquals(val, 6); }
public void NullMethodNoParameters() { NullPropagatingTestClass foo = null; var val = foo?.MethodNoParameters(); AssertEquals(val, 0); }
public void NullPropertyReturnInt() { NullPropagatingTestClass foo = null; var val = foo?.Property; AssertEquals(val, 0); }