public void should_discard_duplicates() { var includes = new IncludeCollection(); includes.Add("Variants.Prices.Types"); includes.Add("Variants"); includes.Add("Variants.Prices"); includes.Add("Variants.Prices.Types"); var paths = includes.ToList(); Assert.Equal(1, paths.Count); Assert.Equal("Variants.Prices.Types", paths[0]); }
public void can_enumerate_all_paths() { var includes = new IncludeCollection(); includes.Add("Variants"); includes.Add("Categories.Types.Suppliers"); includes.Add("Variants.Prices.Types"); includes.Add("Brands.Categories"); includes.Add("OrderItems"); var paths = includes.ToList(); Assert.Equal(4, paths.Count); Assert.Contains("Variants.Prices.Types", paths); Assert.Contains("Categories.Types.Suppliers", paths); Assert.Contains("Brands.Categories", paths); Assert.Contains("OrderItems", paths); }