Ejemplo n.º 1
0
        public void FindObjectByPath_ShouldntFindPathInvalidPathException(Subsystem parent, IStructure obj, string path)
        {
            //Arrange

            //Act
            parent.AddChild(obj);

            //Assert
            Assert.Throws <InvalidPathException>(() => parent.FindObjectByPath(path));
        }
Ejemplo n.º 2
0
        public void FindObjectByPath_ShouldntFindPathToObjectWhenObjectHasParentWithValidWrongPath(Subsystem parent, IStructure obj, string path)
        {
            //Arrange

            //Act
            parent.AddChild(obj);
            IStructure result = parent.FindObjectByPath(path);

            //Assert
            Assert.Null(result);
        }
Ejemplo n.º 3
0
        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);
        }