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

            Bar result;

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

            act.ShouldThrow<NullReferenceException>();
        }
Exemplo 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();
        }
Exemplo 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();
        }
Exemplo n.º 4
0
        public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldThrowException()
        {
            var foobar = new FooBar();

            Bar result;

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

            act.ShouldThrow <NullReferenceException>();
        }