public void FindObjectByPath_ShouldntFindPathInvalidPathException(Subsystem parent, IStructure obj, string path) { //Arrange //Act parent.AddChild(obj); //Assert Assert.Throws <InvalidPathException>(() => parent.FindObjectByPath(path)); }
public void FindObjectByPath_ShouldntFindPathToObjectWhenObjectHasParentWithValidWrongPath(Subsystem parent, IStructure obj, string path) { //Arrange //Act parent.AddChild(obj); IStructure result = parent.FindObjectByPath(path); //Assert Assert.Null(result); }
public void FindObjectByPath_ShouldFindPathToObjectWhenItHasParent(Subsystem parent, IStructure obj, string path) { //Arrange //Act parent.AddChild(obj); IStructure result = parent.FindObjectByPath(path); //Assert Assert.Equal <IStructure>(obj, result); }