Пример #1
0
        public void TestFindConnector()
        {
            //Arrange
            NodeMigrationData migrationDataTest = null; 
            string documentDynPath = Path.Combine(TestDirectory, @"core\NodeStates.dyn");
            XmlDocument xmlDoc = new XmlDocument();           
            string startGuid = "0db97f86-fbd8-4195-b2a0-aa0e78ca1d72";
            string endGuid = "50219c24-e583-4b85-887c-409fb062da6e";

            //Act
            xmlDoc.Load(documentDynPath);
            migrationDataTest = new NodeMigrationData(xmlDoc);
            PortId startPort = new PortId(startGuid, 0, PortType.Input);
            PortId endPort = new PortId(endGuid, 1, PortType.Input); ;
            //This will find a existing connector inside the NodeStates.dyn file
            var xmlNodeConnector = migrationDataTest.FindConnector(startPort, endPort);

            //Assert
            //Just check that the new node created is not null
            Assert.IsNotNull(xmlNodeConnector);
        }