public void desconnect2() { IReceptaclesServant target = new IReceptaclesServant(context); int invalidId = 100; target.disconnect(invalidId); }
public void connectDisconnectTest() { IReceptaclesServant target = new IReceptaclesServant(context); int numConections = 5; int actual; HashSet <int> ids = new HashSet <int>(); for (int i = 0; i < numConections; i++) { string receptacle = receptacleNames[i % receptacleNames.Count]; actual = target.connect(receptacle, servant); Assert.IsTrue(actual > 0); bool added = ids.Add(actual); Assert.IsTrue(added); } actual = 0; foreach (var receptacle in context.GetReceptacles().Values) { actual += receptacle.GetConnections().Count; } Assert.AreEqual(numConections, actual); foreach (var id in ids) { target.disconnect(id); } }
public void desconnect1() { IReceptaclesServant target = new IReceptaclesServant(context); target.disconnect(-1); }