Ejemplo n.º 1
0
 private void AddChildCrowdMemberToParent(CrowdRepository repo, Crowd parent, out CharacterCrowdMember child,
                                          string name)
 {
     child      = GetCharacterUnderTestWithMockDependenciesAnddOrphanedWithRepo(repo);
     child.Name = name;
     child.CharacterActionGroups = GetStandardCharacterActionGroup(child);
     //repo.AllMembersCrowd.AddCrowdMember(child);
     parent.AddCrowdMember(child);
 }
Ejemplo n.º 2
0
        private void AddCrowdwMemberHierarchyWithParentSharedAcrossTwoGranParentsAndTwoGrandChildrenToRepo(
            CrowdRepository repo, out Crowd parent, out Crowd grandParent1, out Crowd grandParent2,
            out CharacterCrowdMember grandChild1, out CharacterCrowdMember grandChild2)
        {
            parent      = TestObjectsFactory.CrowdUnderTest;
            parent.Name = "Parent";

            grandParent1 = repo.Crowds[1];
            grandParent2 = repo.Crowds[2];
            grandParent1.AddCrowdMember(parent);
            grandParent2.AddCrowdMember(parent);

            grandChild1      = TestObjectsFactory.CharacterCrowdMemberUnderTestWithNoParent;
            grandChild1.Name = "gran 1";
            // repo.AllMembersCrowd.AddCrowdMember(grandChild1);
            grandChild2      = TestObjectsFactory.CharacterCrowdMemberUnderTestWithNoParent;
            grandChild2.Name = "gran 2";
            // repo.AllMembersCrowd.AddCrowdMember(grandChild2);

            parent.AddCrowdMember(grandChild1);
            parent.AddCrowdMember(grandChild2);
        }
Ejemplo n.º 3
0
        private void addCrowdChildrenLabeledByOrderToChildCrowd(CrowdRepository repo, string nestedChildName,
                                                                Crowd parent)
        {
            var count = 0;

            foreach (var child in StandardizedFixture.CreateMany <Crowd>().ToList())
            {
                child.Name = nestedChildName + "." + count;
                count++;
                child.Order = count;
                repo.Crowds.Add(child);
                parent.AddCrowdMember(child);
            }
        }
Ejemplo n.º 4
0
        private void addCharacterChildrenLabeledByOrderToChildCrowd(CrowdRepository repo, string nestedName,
                                                                    Crowd parent)
        {
            var count = 0;

            foreach (var grandchild in StandardizedFixture.CreateMany <CharacterCrowdMember>().ToList())
            {
                grandchild.Name = nestedName + "." + count;
                grandchild.CharacterActionGroups = GetStandardCharacterActionGroup(grandchild);
                count++;
                grandchild.Order = count;
                //repo.AllMembersCrowd.AddCrowdMember(grandchild);
                parent.AddCrowdMember(grandchild);
            }
        }