示例#1
0
        public void ExplicitReturnWins()
        {
            var ext  = new MyExtension();
            var prog = TestHelpers.NewJobHost <TestProg>(ext);

            prog.Call("ExplicitReturnWins", new { trigger = "trigger" });
            ext.AssertFromAlpha("triggeralpha");
        }
示例#2
0
        public void ExplicitTaskReturn()
        {
            var ext  = new MyExtension();
            var prog = TestHelpers.NewJobHost <TestProg>(ext);

            prog.Call("ExplicitTaskReturn");
            ext.AssertFromAlpha("alpha");
        }
        public void ExplicitReturnWins()
        {
            var ext = new MyExtension();

            IHost host = new HostBuilder()
                         .ConfigureDefaultTestHost <TestProg>(b =>
            {
                b.AddExtension(ext);
            })
                         .Build();

            host.GetJobHost <TestProg>().Call("ExplicitReturnWins", new { trigger = "trigger" });
            ext.AssertFromAlpha("triggeralpha");
        }
        public void ExplicitTaskReturn()
        {
            var ext = new MyExtension();

            IHost host = new HostBuilder()
                         .ConfigureDefaultTestHost <TestProg>(b =>
            {
                b.AddExtension(ext);
            })
                         .Build();

            host.GetJobHost <TestProg>().Call("ExplicitTaskReturn");
            ext.AssertFromAlpha("alpha");
        }