Esempio n. 1
0
        public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldThrowException()
        {
            var foobar = new FooBar();

            Bar result;

            Action act = () => result = foobar.Foo.Bar;

            act.ShouldThrow<NullReferenceException>();
        }
Esempio n. 2
0
        public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldNotThrowException()
        {
            var foobar = new FooBar();

            Bar result;

            Action act = () => result = foobar.Get(f => f.Foo.Bar);

            act.ShouldNotThrow();
        }
Esempio n. 3
0
        public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldNotThrowException()
        {
            var foobar = new FooBar();

            Bar result;

            Action act = () => result = foobar.Get(f => f.Foo.Bar);

            act.ShouldNotThrow();
        }
Esempio n. 4
0
        public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldThrowException()
        {
            var foobar = new FooBar();

            Bar result;

            Action act = () => result = foobar.Foo.Bar;

            act.ShouldThrow <NullReferenceException>();
        }