PageRenderTime 842ms CodeModel.GetById 161ms app.highlight 1ms RepoModel.GetById 678ms app.codeStats 1ms

/Rhino.Etl.Tests/Dsl/WireRowProcessedEvent.boo

http://github.com/ayende/rhino-etl
Boo | 26 lines | 18 code | 8 blank | 0 comment | 3 complexity | 20c4f738bae8a2c058268f55eace37a1 MD5 | raw file
 1
 2import System
 3
 4aggregate distinct_product_names:
 5    groupBy name
 6    accumulate:
 7        aggregate.name = row.name
 8        
 9aggregate join_product_names:
10    accumulate:
11        aggregate.names = [] if aggregate.names is null
12        aggregate.names.Add(row.name)
13    
14    terminate:
15        aggregate.result = string.Join(", ", aggregate.names.ToArray(string))
16        
17process WireOnRowProcessedEventProcess:
18  
19    rowProcessed:
20        row["name"] = "chocolate" if row["name"] == "milk"
21  
22    # we get the products from the unit test
23    distinct_product_names()
24    join_product_names()
25    # we output the result to the unit test
26