public void NonNegative_NullablePreconditionMethod_ThrowsIfNegative() { var demo = new NonNegativeConsumer(); Assert.Throws <PreconditionException>(() => demo.PreconditionNullableMethod(-1)); }
public void NonNegative_NullablePreconditionMethod_DoesNotThrowIfNull() { var demo = new NonNegativeConsumer(); Assert.DoesNotThrow(() => demo.PreconditionNullableMethod(null)); }