示例#1
0
        private void organizeIntoHierarchy(Hierarchy hierarchy)
        {
            hierarchy.Suites[path] = this;
            suites.Each(x => x.organizeIntoHierarchy(hierarchy));

            specs.Each(x => hierarchy.Specifications[x.id] = x);
        }
        public when_replacing_a_specification()
        {
            theHierarchy = HierarchyLoader.ReadHierarchy(TestingContext.SpecFolder).ToHierarchy();

            theOriginal = theHierarchy.Specifications["embeds"];
            theNew = theOriginal.Clone();
            theNew.path = null;
            theNew.id = theOriginal.id; // gets a new id by default
            theTime = DateTime.Now;
            theHierarchy.Replace(theNew, theTime);
        }
示例#3
0
        public Hierarchy ToHierarchy()
        {
            var hierarchy = new Hierarchy
            {
                Top = this
            };

            organizeIntoHierarchy(hierarchy);

            return hierarchy;
        }
示例#4
0
        public void SetUp()
        {
            theHierarchy = HierarchyLoader.ReadHierarchy(TestingContext.SpecFolder).ToHierarchy();

            theOriginal = theHierarchy.Specifications["embeds"];
            theNew = theOriginal.Clone();
            theNew.path = null;
            theNew.id = theOriginal.id; // gets a new id by default

            theHierarchy.Replace(theNew);
        }