Example #1
0
        public void SetUp()
        {
            graph1 = new BehaviorGraph(null);
            graph2 = new BehaviorGraph(null);

            foo1 = new Foo();
            foo2 = new Foo();

            graph1.Services.AddService(foo1);
            graph2.Services.AddService(foo2);

            graph1.Import(graph2, string.Empty);
        }
Example #2
0
        public void SetUp()
        {
            graph1 = new FubuRegistry(x =>
            {
                x.Route<InputModel>("method1/{Name}/{Age}")
                    .Calls<TestController>(c => c.AnotherAction(null)).OutputToJson();

                x.Route<InputModel>("method2/{Name}/{Age}")
                    .Calls<TestController>(c => c.AnotherAction(null)).OutputToJson();

                x.Route<InputModel>("method3/{Name}/{Age}")
                    .Calls<TestController>(c => c.AnotherAction(null)).OutputToJson();
            }).BuildGraph();

            chain = new BehaviorChain();
            graph1.AddChain(chain);

            graph2 = new FubuRegistry(x =>
            {
                x.Route<InputModel>("/root/{Name}/{Age}")
                    .Calls<TestController>(c => c.AnotherAction(null)).OutputToJson();
            }).BuildGraph();

            graph2.Import(graph1, "area1");
        }