示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 private static void AddMediatRPipelineBehavior(this IServiceCollection services)
 {
     GetEventTypesShortCircuit.RegisterMe(services);
     GetEventTypeShortCircuit.RegisterMe(services);
     GetGlobalActionsShortCircuit.RegisterMe(services);
 }