public void LegalAsciiArtParallel()
{
List<string> results1 = new List<string>();
List<string> results2 = new List<string>();
StartPoint<int> s1 = Helpers.GetStartpointCounter(1, 15);
StartPoint<int> s2 = Helpers.GetStartpointCounter(5, 35);
TaskNode<int, string> filter1 = Helpers.GetFilter();
TaskNode<int, string> filter2 = Helpers.GetFilter();
EndPoint<string> n1 = Helpers.GetEndpoint(results1);
EndPoint<string> n2 = Helpers.GetEndpoint(results2);
n2.ThreadNumber = 3;
Flow flow = Flow.FromAsciiArt(@"
a-->b->c
d->e--->f
",
new Dictionary<char, TaskNode>()
{
{'a', s1},
{'b', filter1},
{'c', n1},
{'d', s2},
{'e', filter2},
{'f', n2}
}
);
flow.Start();
flow.RunToCompletion();
Assert.AreEqual(4, results1.Count);
Assert.AreEqual(6, results2.Count);
}