Esempio n. 1
0
        public void Creating_an_action_using_the_action_factory_supplying_a_fully_qualified_type_name_should_correctly_resolve_and_inject_dependencies()
        {
            var actionFactory = new TestActionFactory();

            actionFactory.Kernel.Bind <TestActionIoC>().ToSelf();

            var action = actionFactory.CreateAction(typeof(Add).FullName) as Add;

            Assert.IsNotNull(action);
            Assert.IsNotNull(action.Injected);
        }
Esempio n. 2
0
            public TestRequirements(IKernel kernel)
            {
                RequestPersistence = new TestRequestPersistence();
                StatePersistence   = new TestStatePersistence((r) => "Zero");
                var actionFactory = new TestActionFactory(kernel);

                PipelineConfiguration = new ActionPipelineConfiguration(
                    actionFactory, "TestPipeline",
                    new AllowedState("Zero",
                                     nameof(Add)),
                    new AllowedState("Positive",
                                     nameof(Add)),
                    new AllowedState("Negative",
                                     nameof(Add))
                    );
            }