Exemple #1
0
        private void AddToIdMap(IExampleContainer exampleContainer)
        {
            _idMap.Add(exampleContainer.Id, exampleContainer);
            foreach (var example in exampleContainer.Examples)
                _idMap.Add(example.Id, example);

            foreach (var child in exampleContainer.ExampleContainers)
                AddToIdMap(child);
        }
Exemple #2
0
        private void CreateContainerElements(IExampleContainer[] exampleContainers, UnitTestElement parent)
        {
            foreach (var exampleContainer in exampleContainers)
            {
                var element = new ExampleContainerElement(_provider, _project, parent, (ExampleContainer)exampleContainer);
                _consumer(element);

                CreateContainerElements(exampleContainer.ExampleContainers, element);

                foreach (var example in exampleContainer.Examples)
                    _consumer(new ExampleElement(_provider, element, _project, (Example)example));

            }
        }
 public ExampleContainerElement(IUnitTestProvider provider, IProject project, UnitTestElement parent, IExampleContainer container)
     : base(provider, container.ContainingSpec, project, parent)
 {
     _shortName = container.Name;
     Id = container.Id;
 }