public void GetOrchestration_Inherited_Ignored() { var configuration = Substitute.For <IOrchestrationConfiguration>(); configuration.Ignored.Returns(new List <Type>() { typeof(TestCommand) }); var dispatcher = new ProviderCommandDispatchActivity(configuration); var command = new TestInheritedCommand(); var orchestration = dispatcher.RunActivity(command); Assert.Null(orchestration); }
public void GetOrchestration_Inherited_Match() { var settings = Substitute.For <IOrchestrationSettings>(); settings.OrchestrationName.Returns(nameof(TestCommandOrchestration)); var configuration = Substitute.For <IOrchestrationConfiguration>(); configuration.Orchestrations.Returns(new Dictionary <Type, IOrchestrationSettings>() { { typeof(TestCommand), settings } }); var dispatcher = new ProviderCommandDispatchActivity(configuration); var command = new TestInheritedCommand(); var orchestration = dispatcher.RunActivity(command); Assert.Equal(nameof(TestCommandOrchestration), orchestration); }