public void Given_ContextObject_When_NullObjectInPathExists_Then_ShouldResultInNull() { var obj = new ContextObject(new Container { X = new Child { } }); Assert.IsNull(obj.GetObject("X.Y.Z")); }
public void Given_ContextObject_When_NoNullObjectInPathExists_Then_ShouldResultInValue() { var obj = new ContextObject(new Container { X = new Child { Y = new GrandChild { Z = "endofchain" } } }); Assert.AreSame(obj.GetObject("X.Y.Z"), "endofchain"); }