public void CopyProvidedControllerTest() { //Arrange TECCatalogs catalogs = ModelCreation.TestCatalogs(rand); TECProvidedController controller = ModelCreation.TestProvidedController(catalogs, rand); TECProvidedController copy = controller.CopyController(new Dictionary <Guid, Guid>()) as TECProvidedController; //TECTagged Assert.AreEqual(controller.Name, copy.Name); Assert.AreEqual(controller.Description, copy.Description); Assert.IsTrue(controller.Tags.SequenceEqual(copy.Tags)); //TECScope Assert.IsTrue(controller.AssociatedCosts.SequenceEqual(copy.AssociatedCosts)); //TECLocated Assert.AreEqual(controller.Location, copy.Location); //TECController Assert.AreEqual(controller.IsServer, copy.IsServer); //TECFBOController Assert.AreEqual(controller.Type, copy.Type); Assert.IsTrue(controller.IOModules.SequenceEqual(copy.IOModules)); }
public void CopyControllerTest() { Random rand = new Random(0); TECBid bid = ModelCreation.TestBid(rand); TECProvidedController controller = ModelCreation.TestProvidedController(bid.Catalogs, rand); bid.AddController(controller); TECProvidedController copy = controller.CopyController(new Dictionary <Guid, Guid>()) as TECProvidedController; Assert.AreEqual(controller.Type, copy.Type); Assert.IsTrue(controller.IOModules.SequenceEqual(copy.IOModules)); Assert.AreEqual(controller.ChildrenConnections.Count, copy.ChildrenConnections.Count); }