public void ShouldRequestContinue_ReturnsTrue_IfPlaybookInConfig() { var mockConfig = new MicroservicesConfig() { Playbook = "Valid endpoint" }; var mockShortCircuitImplementation = new GetEventTypeShortCircuit(mockConfig); var result = mockShortCircuitImplementation.ShouldRequestContinue(mockConfig); Assert.AreEqual(result, true); }
public void ShouldRequestContinue__Returns_True_If_Playbook_In_Config() { var configProps = new Dictionary <string, string>(); configProps.Add("Microservices:0", "Playbook"); var mockConfig = new MockConfig(configProps); var mockShortCircuitImplementation = new GetEventTypeShortCircuit(mockConfig); var result = mockShortCircuitImplementation.ShouldRequestContinue(mockConfig); Assert.AreEqual(result, true); }
private static void AddMediatRPipelineBehavior(this IServiceCollection services) { GetEventTypesShortCircuit.RegisterMe(services); GetEventTypeShortCircuit.RegisterMe(services); GetGlobalActionsShortCircuit.RegisterMe(services); }