public void ExecuteWorkflowAction_ActionWithoutDefaultConstructorAndNoDependencyResolver_ThrowsMissingMethodException()
        {
            DependencyInjectionWorkflow wf = new DependencyInjectionWorkflow(DependencyInjectionWorkflow.State.Start);

            wf.DependencyResolver = null;
            TestDelegate del = () => wf.Fire(DependencyInjectionWorkflow.Trigger.DoStuff);

            Assert.Throws <MissingMethodException>(del);
        }
        public void ExecuteWorkflowAction_WithDependencyResolver_UsesResolver()
        {
            IWorkflowEngineDependencyResolver resolver = Substitute.For <IWorkflowEngineDependencyResolver>();

            resolver.GetInstance <NoDefaultConstructorAction>().Returns(new NoDefaultConstructorAction("test", 1));
            DependencyInjectionWorkflow wf = new DependencyInjectionWorkflow(DependencyInjectionWorkflow.State.Start);

            wf.DependencyResolver = resolver;
            wf.Fire(DependencyInjectionWorkflow.Trigger.DoStuff);
            resolver.Received(1).GetInstance <NoDefaultConstructorAction>();
        }