public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldThrowException() { var foobar = new FooBar(); Bar result; Action act = () => result = foobar.Foo.Bar; act.ShouldThrow<NullReferenceException>(); }
public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldNotThrowException() { var foobar = new FooBar(); Bar result; Action act = () => result = foobar.Get(f => f.Foo.Bar); act.ShouldNotThrow(); }
public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldNotThrowException() { var foobar = new FooBar(); Bar result; Action act = () => result = foobar.Get(f => f.Foo.Bar); act.ShouldNotThrow(); }
public void GivenNullInChainOfPerperties_WhenAccesingLastProerty_ShouldThrowException() { var foobar = new FooBar(); Bar result; Action act = () => result = foobar.Foo.Bar; act.ShouldThrow <NullReferenceException>(); }