Esempio n. 1
0
        public override IEnumerable <object[]> GetData(MethodInfo testMethod)
        {
            if (testMethod == null)
            {
                throw new ArgumentNullException(nameof(testMethod));
            }

            testDataProvider.LoadDefinitions();

            List <object[]> categoryTests = new List <object[]>();

            foreach (TestCategoryDefinition category in testDataProvider.GetCategories())
            {
                if (!string.IsNullOrEmpty(category?.Name))
                {
                    foreach (TestDefinition test in category.Tests)
                    {
                        if (!string.IsNullOrEmpty(test.Name))
                        {
                            categoryTests.Add(new object[] { category.Name, test.Name });
                        }
                    }
                }
            }

            return(categoryTests);
        }