public void TestPivotGenerator() { var data = ShopRiteSalesData.GenerateFullFlatData(); var typeWrapper = new Pivot.Accessories.Mapping.TypeWrapper <ShopRiteSales, AggregationFunctions>(); var generator = new PivotGenerator <ShopRiteSales, AggregationFunctions>(typeWrapper); var mtx = generator.GeneratePivot(data).Matrix; DataOutput.CSVHelper.SaveCSVFile(mtx, "ShopRitesSalesPivot.csv"); }
public void TestXYDictionary() { var data = ShopRiteSalesData.GenerateFullFlatData(); var typeWrapper = new Pivot.Accessories.Mapping.TypeWrapper <ShopRiteSales, AggregationFunctions>(); var generator = new DictionaryGenerator <ShopRiteSales, AggregationFunctions>(typeWrapper); // checking X var dirX = generator.GenerateXDictionary(data); Assert.AreEqual(82, dirX.Count); // expecting exact amount for combinations var dirY = generator.GenerateYDictionary(data); Assert.AreEqual(411, dirY.Count); // expecting exact amount for combinations }