public void NonNegative_NullablePostconditionMethod_ThrowsIfNegative() { var demo = new NonNegativeConsumer(); Assert.Throws <PostconditionException>(() => demo.PostconditionNullableMethod(-1)); }
public void NonNegative_NullablePostconditionMethod_DoesNotThrowIfNull() { var demo = new NonNegativeConsumer(); Assert.DoesNotThrow(() => demo.PostconditionNullableMethod(null)); }