public void TroopSenderTest() { Action action = new Action("0"); TroopSenderParamaters actionParameters = new TroopSenderParamaters(); actionParameters.Id = "0"; action.AddTroopSenderParameters(actionParameters); Assert.IsNotNull(action.TroopSenderParameters); Assert.AreEqual(1, action.TroopSenderParameters.Count); Assert.IsNull(action.GetTroopSenderParameters("99")); Assert.IsNotNull(action.GetTroopSenderParameters("0")); Assert.AreEqual("0", action.GetTroopSenderParameters("0").Id); }
public void ActionTest() { Action action = new Action("0"); // ReSharper disable UseObjectOrCollectionInitializer ActionParameters actionParameters = new ActionParameters(); // ReSharper restore UseObjectOrCollectionInitializer actionParameters.Id = "0"; action.AddActionParameters(actionParameters); Assert.IsNotNull(action.ActionParameters); Assert.AreEqual(1, action.ActionParameters.Count); Assert.IsNull(action.GetActionParameters("99")); Assert.IsNotNull(action.GetActionParameters("0")); Assert.AreEqual("0", action.GetActionParameters("0").Id); }
public void ActionContainerTest() { Action action = new Action("1"); ActionParameters actionParameters = new ActionParameters(); actionParameters.Id = "1"; action.AddActionParameters(actionParameters); ActionList actionList = new ActionList(); actionList.AddAction("1", action); ActionContainer actionContainer = new ActionContainer(); actionContainer.AddActionList("C:\\asd.xml", actionList); Assert.IsNotNull(actionContainer.ActionsContainer); Assert.AreEqual(1, actionContainer.ActionsContainer.Count); Assert.IsNotNull(actionList.ActionsList); Assert.AreEqual(1, actionList.ActionsList.Count); Assert.IsNull(actionList.GetAction("99")); Assert.IsNotNull(actionList.GetAction("1")); Assert.AreEqual("1", actionList.GetAction("1").GetActionParameters("1").Id); Assert.AreEqual("1", actionContainer.GetActionList("C:\\asd.xml").GetAction("1").GetActionParameters("1").Id); }
public void AddTroopSenderAction(Action troopSenderAction) { troopSenderList.Add(troopSenderAction); }
public void AddSendResourcesAction(Action sendAction) { sendResourcesList.Add(sendAction); }
public void AddFakeAction(Action action) { fakeAttackList.Add(action); }
public void AddAction(string id, Action sendAction) { actionsList.Add(id, sendAction); }