/Rhino.Etl.Tests/Dsl/AggregationFixture.cs

http://github.com/ayende/rhino-etl · C# · 36 lines · 32 code · 4 blank · 0 comment · 0 complexity · b02e76c1c0a3cf0d57aab8e334e4be86 MD5 · raw file

  1. namespace Rhino.Etl.Tests.Dsl
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using Aggregation;
  7. using Core;
  8. using Joins;
  9. using Xunit;
  10. using Rhino.Etl.Core.Operations;
  11. using Rhino.Etl.Dsl;
  12. public class AggregationFixture : BaseAggregationFixture
  13. {
  14. [Fact]
  15. public void CanCompile()
  16. {
  17. EtlProcess process = CreateDslInstance("Dsl/Aggregate.boo");
  18. Assert.NotNull(process);
  19. }
  20. [Fact]
  21. public void CanPerformAggregationFromDsl()
  22. {
  23. EtlProcess process = CreateDslInstance("Dsl/Aggregate.boo");
  24. process.Register(new GenericEnumerableOperation(rows));
  25. ResultsToList operation = new ResultsToList();
  26. process.RegisterLast(operation);
  27. process.Execute();
  28. Assert.Equal(1, operation.Results.Count);
  29. Assert.Equal("milk, sugar, coffee", operation.Results[0]["result"]);
  30. }
  31. }
  32. }