private static void Dump(TextWriter writer, IAggregationResult result, AggregationConfig config, int[] keys, int level) { for (var i = 0; i < keys.Length; i++) { if (i < level) { writer.Write(keys[i] + ","); } else { writer.Write("-,"); } } writer.WriteLine(String.Join(",", config.Aggregators.Select(a => result.Get(a).ToString("")))); foreach (var groupKey in result.Keys.OrderBy(k => k)) { keys[level] = groupKey; Dump(writer, result.Get(groupKey), config, keys, level + 1); } }
private static void Dump(TextWriter writer, IAggregationResult result, AggregationConfig config, int[] keys, int level) { for (var i = 0; i < keys.Length; i++) { if (i < level) { writer.Write(keys[i] + ","); } else { writer.Write("-,"); } } writer.WriteLine(String.Join(",", config.Aggregators.Select(a => result.Get(a).ToString("")))); foreach (var groupKey in result.Keys.OrderBy(k => k)) { keys[level] = groupKey; Dump(writer, result.Get(groupKey), config, keys, level + 1); } }
protected void VerifyInternal() { WaitForCompletion(); Verify(_rootResult, _entity0, _entity1, _entity2); Verify(_rootResult.Get(0), _entity0); Verify(_rootResult.Get(1), _entity1); Verify(_rootResult.Get(2), _entity2); }
private void Verify(Entity[] entities, IAggregationResult result, WgtAvgPropertyAggregatorConfig config) { Assert.Equal(CalculateWgtAvg(entities, config.Properties[0], config.Properties[1]), result.Get(config)); }