public void TestXDictionary() { var data = ShopRiteSalesData.GenerateXMetricsData(); var typeWrapper = new Pivot.Accessories.Mapping.TypeWrapper <ShopRiteSales, AggregationFunctions>(); var generator = new DictionaryGenerator <ShopRiteSales, AggregationFunctions>(typeWrapper); var dirX = generator.GenerateXDictionary(data); Assert.AreEqual(65, dirX.Count); // expecting exact amount for combinations }
public void TestBuildOrderBy() { var data = ShopRiteSalesData.GenerateXMetricsData(); var typeWrapper = new Pivot.Accessories.Mapping.TypeWrapper <ShopRiteSales, AggregationFunctions>(); var queryBuilderObj = new QueryBuilder <ShopRiteSales, AggregationFunctions>(typeWrapper); var result0 = queryBuilderObj.XBuildOrderBy(data, 0); Assert.IsNotNull(result0.ElementAt(14)); var result1 = queryBuilderObj.XBuildOrderBy(data, 1); Assert.IsNotNull(result0.ElementAt(14)); var result2 = queryBuilderObj.XBuildOrderBy(data, 2); Assert.IsNotNull(result0.ElementAt(14)); var result3 = queryBuilderObj.XBuildOrderBy(data, 3); Assert.IsNotNull(result0.ElementAt(14)); }