Exemplo n.º 1
0
        public void TestChangePipeSafetyLimit()
        {
            FlowDiagram fl = new FlowDiagram();

            fl.AddComponent(new Point(1, 1), ComponentType.Pump);
            Component c = fl.Components[0];

            fl.ChangeCapacity(c, 25);
            fl.ChangeCurrentFlow(c, 20);
            fl.AddComponent(new Point(1, 1), ComponentType.Sink);
            Component c2 = fl.Components[1];

            fl.Connect(c2, c, null, null);
            fl.ChangeSafetyLimit(160, fl.Connections[0]);
            Assert.AreEqual(fl.Connections[0].SafetyLimit, 160);
        }