Ejemplo n.º 1
0
 public SpecSuite Add(SpecCategory category)
 {
     _categories.Add(category);
     return this;
 }
Ejemplo n.º 2
0
 public void AddRange(SpecCategory[] categories)
 {
     foreach (var specCategory in categories)
         Add(specCategory);
 }
Ejemplo n.º 3
0
        private SpecSuite processSuite(Func<SpecificationMethodInfo, SpecInfo> processor, params Assembly[] assemblies)
        {
            var suite = new SpecSuite();
            var specs = assemblies
                .SelectMany(getSpecs)
                .Select(x => new { Category = x.Specification.SpecificationCategory, SpecInfo = processor(x) })
                .GroupBy(x => x.Category)
                .Select(group =>
                {
                    var category = new SpecCategory(group.Key);

                    foreach (var g in group)
                        category.Add(g.SpecInfo);

                    return category;
                }).ToArray();

            suite.AddRange(specs);

            return suite;
        }