Exemple #1
0
        public void CloneTests(ActionSequence action, int numActions)
        {
            for (int i = 0; i < numActions; i++)
            {
                var a = new MockAction();
                a.NameId = string.Format("Name{0}", i);
                action.Actions.Add(a);
            }

            var newAction = action.Clone() as ActionSequence;

            Assert.AreEqual(action.Actions.Count, newAction.Actions.Count);
            Assert.AreEqual(action.NameId, newAction.NameId);
            for (int i = 0; i < numActions; i++)
            {
                var name = string.Format("Name{0}", i);
                Assert.AreEqual(action.Actions[i].NameId, newAction.Actions[i].NameId);
            }
        }