Example #1
0
        public void ValueShouldThrowExceptionGivenNullScalar()
        {
            Scalar <object> scalar = new NotNull <object>(null);
            Action          action = () => scalar.Value();

            action.ShouldThrow <Exception>().WithMessage("NULL instead of valid scalar");
        }
Example #2
0
        public void ValueShouldThrowExceptionGivenValidValue()
        {
            object          actual   = new object();
            Scalar <object> scalar   = new NotNull <object>(actual);
            object          expected = scalar.Value();

            expected.Should().BeSameAs(actual);
        }