Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
        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));
        }