public void TestNodeContainerIterator_RemoveAlreadyRemovedNode() { AgentDTO agent = new AgentDTO() { ID = 1, Name = "NAgent1", Territory = "North" }; ///Remove a node agentContainerIterator.RemoveNode(agent); ///Try removing again Assert.AreEqual(false, agentContainerIterator.RemoveNode(agent)); }
public void TestNodeContainerIterator_AddAndScheduleNode() { AgentDTO newAgent = new AgentDTO() { ID = 2, Name = "NAgent2", Territory = "North" }; agentContainerIterator.AddNode(newAgent); ///Schedule the node agentContainerIterator.MoveNext(); Assert.AreEqual(newAgent, agentContainerIterator.PreviousNode()); }
public void TestNodeContainerIterator_RemoveNode() { AgentDTO agentToRemove = new AgentDTO() { ID = 1, Name = "NAgent1", Territory = "North" }; Assert.AreEqual(true, agentContainerIterator.RemoveNode(agentToRemove)); }
public void TestNodeContainerIterator_AddNode() { AgentDTO newAgent = new AgentDTO() { ID = 2, Name = "NAgent2", Territory = "North" }; agentContainerIterator.AddNode(newAgent); Assert.AreEqual(newAgent, agentContainerIterator.PeekCurrent()); }
public void Initialize() { agentContainerIterator = new LIFONodeContainerIterator<AgentDTO>(); AgentDTO newAgent = new AgentDTO() { ID = 1, Name = "NAgent1", Territory = "North" }; agentContainerIterator.AddNode(newAgent); }
public void TestLeadDistribution_RemoveAgent() { ///Try Removing an agent AgentDTO availableAgent = new AgentDTO() { ID = 1, Name = "NAgent1", Territory = "North" }; Assert.AreEqual(true, service.RemoveAgent(availableAgent)); }