Beispiel #1
0
        public async Task Should_Infer_Command_Behvaior_Pipelines()
        {
            var bee     = new Bee();
            var handler = new FilteredHandler();
            var resp    = await handler.CommandAsync <Bee>(bee);

            Assert.IsInstanceOfType(resp, typeof(Bee));
            Assert.AreEqual(1, bee.Filters.Count);
            Assert.IsInstanceOfType(bee.Filters[0], typeof(LogBehavior <Command, object>));
        }
Beispiel #2
0
        public async Task Should_Infer_Task_Pipelines()
        {
            var baz     = new Baz();
            var handler = new FilteredHandler();
            var resp    = await handler.CommandAsync <Baz>(baz);

            Assert.IsInstanceOfType(resp, typeof(SuperBaz));
            Assert.AreEqual(1, baz.Filters.Count);
            Assert.IsInstanceOfType(baz.Filters[0], typeof(LogBehaviorT <Baz, SuperBaz>));
        }
Beispiel #3
0
        public async Task Should_Infer_Promise_Pipelines()
        {
            var boo     = new Boo();
            var handler = new FilteredHandler();
            var resp    = await handler.CommandAsync <Boo>(boo);

            Assert.IsInstanceOfType(resp, typeof(Boo));
            Assert.AreEqual(1, boo.Filters.Count);
            Assert.IsInstanceOfType(boo.Filters[0], typeof(LogBehavior <Boo, Boo>));
        }
Beispiel #4
0
        public async Task Should_Promote_Promise_Behvaior_Pipelines()
        {
            var foo     = new Foo();
            var handler = new FilteredHandler();
            var resp    = await handler.CommandAsync <Foo>(foo);

            Assert.IsInstanceOfType(resp, typeof(SuperFoo));
            Assert.AreEqual(1, foo.Filters.Count);
            Assert.IsInstanceOfType(foo.Filters[0], typeof(LogBehavior <Foo, SuperFoo>));
        }