public void RemovePointFromConnectedHardwired() { TECControllerType type = new TECControllerType(new TECManufacturer()); type.IO.Add(new TECIO(IOType.AI)); TECProvidedController controller = new TECProvidedController(type); TECConnectionType connectionType = new TECConnectionType(); TECDevice device = new TECDevice(new List <TECConnectionType> { connectionType }, new List <TECProtocol>(), new TECManufacturer()); TECSubScope subScope = new TECSubScope(); subScope.Devices.Add(device); TECPoint point = new TECPoint(); point.Type = IOType.AI; subScope.AddPoint(point); controller.Connect(subScope, subScope.HardwiredProtocol()); subScope.RemovePoint(point); Assert.IsFalse(subScope.Points.Contains(point)); Assert.IsTrue(controller.AvailableIO.IONumber(IOType.AI) == 1); }
public void RemovePointTest() { TECSubScope subScope = new TECSubScope(); TECPoint point = new TECPoint(); subScope.AddPoint(point); subScope.RemovePoint(point); Assert.IsFalse(subScope.Points.Contains(point)); }
private void deletePointExecute(TECPoint point) { toAdd.RemovePoint(point); updateConnectVMWithQuantity(Quantity); }