Ejemplo n.º 1
0
        public void CanUpdateInstanceConnectionsTest()
        {
            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;
                }
            }

            Assert.IsTrue(typical.CanUpdateInstanceConnections());

            typical.Instances.Clear();

            Assert.IsFalse(typical.CanUpdateInstanceConnections());
        }