public void ShouldFilterByNamespaceAndCategoryWhenBothArePresent() { Options.Categories = Categories; Options.Namespaces = Namespaces; var runs = new FilteredSplitExtractor(Options).Execute(); AssertNamespaces(runs); AssertMethodCategories(runs); }
public void ShouldContainSubNamespaces() { Options.Namespaces = new List <string> { "Slowlenium" }; var runs = new FilteredSplitExtractor(Options).Execute(); Assert.AreEqual(24, runs.SelectMany(r => r.Tests).Count()); }
public void ShouldIncludeTestsThatHaveACategoryOnTheFixture() { Options.Categories = new List <string> { "meow" }; var runs = new FilteredSplitExtractor(Options).Execute(); Assert.AreEqual(1, runs.SelectMany(r => r.Tests).Count()); var classCategories = runs.SelectMany(r => r.Tests.Select(t => t.ReflectedType).Distinct()) .SelectMany(t => t.GetCustomAttributes <CategoryAttribute>().Select(attr => attr.Name)); Assert.IsTrue(classCategories.All(c => Options.Categories.Contains(c))); }