public void Fusing_must_properly_fuse_a_FusedGraph_that_has_been_extended_with_AsyncBoundary() { var src = Fusing.Aggressive(Graph(true)); var fused = Fusing.Aggressive(Source.FromGraph(src).To(Sink.First <int>())); Verify(fused, modules: 2, downstreams: 6); }
public void Fusing_must_not_fuse_accross_AsyncBoundary() { var g = Graph(true); var fused = Fusing.Aggressive(g); Verify(fused, modules: 2, downstreams: 5); }
public void Fusing_must_fuse_a_moderately_complex_graph() { var g = Graph(false); var fused = Fusing.Aggressive(g); Verify(fused, modules: 1, downstreams: 5); }
private static void TestFussion() { var flow = Flow.Create <int>().Select(x => x * 2).Where(x => x > 500); var fused = Fusing.Aggressive(flow); var s = Source.From(Enumerable.Range(0, int.MaxValue)).Via(fused).Take(1000); WithMaterializer(m => s.RunForeach(x => Console.WriteLine(x), m)).Wait(); }
private static RunnableGraph <TestLatch> Fuse(IRunnableGraph <TestLatch> graph) => RunnableGraph.FromGraph(Fusing.Aggressive(graph));
public void Fusing_must_not_fuse_a_FusedGraph_again() { var g = Fusing.Aggressive(Graph(false)); Fusing.Aggressive(g).Should().BeSameAs(g); }
private static IGraph <SourceShape <int>, NotUsed> CreateSource(int count) => Fusing.Aggressive(Source.Repeat(1).Take(count));