Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
        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);
        }
Пример #4
0
 public void AddTroopSenderAction(Action troopSenderAction)
 {
     troopSenderList.Add(troopSenderAction);
 }
Пример #5
0
 public void AddSendResourcesAction(Action sendAction)
 {
     sendResourcesList.Add(sendAction);
 }
Пример #6
0
 public void AddFakeAction(Action action)
 {
     fakeAttackList.Add(action);
 }
Пример #7
0
 public void AddAction(string id, Action sendAction)
 {
     actionsList.Add(id, sendAction);
 }