예제 #1
0
        void When_non_recursive_but_ends_nullable_should_visit_ok(int input, int?expected)
        {
            // Arrange

            var instance = new Foo {
                Number = input
            };
            Expression <Func <Foo, int> > ex = x => x.GetNullWhenIs2().Length;

            // Act

            var func = (visitorNonRecursive.Visit(ex) as Expression <Func <Foo, int?> >).Compile();

            // Assert

            func(instance).Should().Be(expected);
        }
예제 #2
0
        void Single_member_property_of_nullable_struct(char?input, char?expected)
        {
            // Arrange

            Expression <Func <char?, char> > ex = x => x.Value;

            // Act

            var func = (visitor.Visit(ex) as Expression <Func <char?, char?> >).Compile();

            // Assert

            func(input).Should().Be(expected);
        }