public void ValueShouldThrowExceptionGivenNullScalar() { Scalar <object> scalar = new NotNull <object>(null); Action action = () => scalar.Value(); action.ShouldThrow <Exception>().WithMessage("NULL instead of valid scalar"); }
public void ValueShouldThrowExceptionGivenValidValue() { object actual = new object(); Scalar <object> scalar = new NotNull <object>(actual); object expected = scalar.Value(); expected.Should().BeSameAs(actual); }