public void Configure(BehaviorGraph graph) { var diagnosticGraph = new DiagnosticGraph(); diagnosticGraph.Add(graph.ApplicationAssembly); diagnosticGraph.Add(typeof(IPackageFacility).Assembly); PackageRegistry.PackageAssemblies.Each(diagnosticGraph.Add); diagnosticGraph.Groups().SelectMany(x => x.Chains).Each(graph.AddChain); graph.Services.AddService(diagnosticGraph); }
public void current_context_and_group_with_normal_chain() { var currentChain = MockRepository.GenerateMock<ICurrentChain>(); currentChain.Stub(x => x.OriginatingChain).Return(new BehaviorChain()); var graph = new DiagnosticGraph(); graph.Add(typeof(DiagnosticChain).Assembly); var request = new InMemoryFubuRequest(); request.Set(new GroupRequest{Name = "FubuMVC.Diagnostics"}); var context = new DiagnosticContext(currentChain, request, graph); context.CurrentChain().ShouldBeNull(); context.CurrentGroup().Name.ShouldEqual("FubuMVC.Diagnostics"); }