public void CanPerformAggregationFromDsl() { EtlProcess process = CreateDslInstance("Dsl/Aggregate.boo"); process.Register(new GenericEnumerableOperation(rows)); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); process.Execute(); Assert.Equal(1, operation.Results.Count); Assert.Equal("[milk, sugar, coffee]", operation.Results[0]["result"]); }
public async Task CanPerformExternalOperationFromDsl() { EtlProcess process = CreateDslInstance("Dsl/Import.boo"); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); await process.Execute(); Assert.Equal(10, operation.Results.Count); Assert.Equal("1, 1, 2, 3, 5, 8, 13, 21, 34, 55", string.Join(", ", operation.Results.Select(r => r["id"]).ToArray())); }
public void CheckIfOnRowProcessedEventWasWired() { using (var process = CreateDslInstance("Dsl/WireRowProcessedEvent.boo")) { process.Register(new GenericEnumerableOperation(rows)); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); process.Execute(); Assert.AreEqual(1, operation.Results.Count); Assert.AreEqual("chocolate, sugar, coffee", operation.Results[0]["result"]); } }
public void CheckIfOnRowProcessedEventWasWired() { using (var process = CreateDslInstance("Dsl/WireRowProcessedEvent.boo")) { process.Register(new GenericEnumerableOperation(rows)); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); process.Execute(); Assert.Single(operation.Results); Assert.Equal("[chocolate, sugar, coffee]", operation.Results[0]["result"]); } }
public void CanPerformAggregationFromDsl() { EtlProcess process = CreateDslInstance("Dsl/Aggregate.boo"); process.Register(new GenericEnumerableOperation(rows)); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); process.Execute(); Assert.Equal(1, operation.Results.Count); Assert.Equal("milk, sugar, coffee", operation.Results[0]["result"]); }
public void CheckIfOnFinishedProcessingEventWasWired() { using (var process = CreateDslInstance("Dsl/WireOnFinishedProcessingEvent.boo")) { process.Register(new GenericEnumerableOperation(rows)); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); process.Execute(); Assert.AreEqual(1, operation.Results.Count); Assert.IsTrue(File.Exists(@"OnFinishedProcessing.wired")); File.Delete(@"OnFinishedProcessing.wired"); } }
public void CheckIfOnFinishedProcessingEventWasWired() { using (var process = CreateDslInstance("Dsl/WireOnFinishedProcessingEvent.boo")) { process.Register(new GenericEnumerableOperation(rows)); ResultsToList operation = new ResultsToList(); process.RegisterLast(operation); process.Execute(); Assert.Single(operation.Results); Assert.True(File.Exists(@"OnFinishedProcessing.wired")); File.Delete(@"OnFinishedProcessing.wired"); } }