StoryTeller.Model.Persistence.Suite.GetAllSpecs C# (CSharp) Method

GetAllSpecs() public method

public GetAllSpecs ( ) : IEnumerable
return IEnumerable
        public IEnumerable<Specification> GetAllSpecs()
        {
            return Specifications.Union(suites.SelectMany(x => x.GetAllSpecs()));
        }

Usage Example

示例#1
0
        public IEnumerable<Specification> Filter(Suite top)
        {
            if (Lifecycle == Lifecycle.Any && Suite.IsEmpty()) return top.GetAllSpecs();

            IEnumerable<Specification> specs;

            if (Suite.IsNotEmpty())
            {
                var suite = top.suites.FirstOrDefault(x => x.name == Suite);
                if (suite == null)
                    throw new SuiteNotFoundException(Suite, top);

                specs = suite.GetAllSpecs();
            }
            else
            {
                specs = top.GetAllSpecs();
            }

            if (Lifecycle != Lifecycle.Any)
            {
                specs = specs.Where(x => x.Lifecycle == Lifecycle);
            }

            return specs.ToArray();
        }
All Usage Examples Of StoryTeller.Model.Persistence.Suite::GetAllSpecs