Beispiel #1
0
        public void UpdateInstanceConnectionsTest()
        {
            Random      rand     = new Random();
            TECCatalogs catalogs = ModelCreation.TestCatalogs(rand);
            TECTypical  typical  = ModelCreation.TestTypical(catalogs, rand);

            typical.AddInstance();

            foreach (var controller in typical.Controllers)
            {
                foreach (var connection in controller.ChildrenConnections)
                {
                    connection.Length = 324;
                }
            }

            typical.UpdateInstanceConnections();

            foreach (var instance in typical.Instances)
            {
                foreach (var controller in instance.Controllers)
                {
                    foreach (var connection in controller.ChildrenConnections)
                    {
                        Assert.AreEqual(324, connection.Length);
                    }
                }
            }
        }