public void Returns_GetCircuitBreakerForcedOpen_AppSetting_As_Boolean_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act bool value = hystrixConfigurationService.GetCircuitBreakerForcedOpen(); Assert.Equal(true, value); }
public void Returns_False_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act bool value = hystrixConfigurationService.GetCircuitBreakerForcedOpen(); Assert.Equal(false, value); }
public void Returns_HystrixCommandEnabled_AppSetting_As_Boolean_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act bool value = hystrixConfigurationService.GetHystrixCommandEnabled(); Assert.False(value); }
public void Returns_True_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act bool value = hystrixConfigurationService.GetHystrixCommandEnabled(); Assert.True(value); }
public void Returns_1000_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int value = hystrixConfigurationService.GetCommandTimeoutInMilliseconds(); Assert.Equal(1000, value); }
public void Returns_100_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int value = hystrixConfigurationService.GetMetricsRollingPercentileBucketSize(); Assert.Equal(100, value); }
public void Returns_MetricsRollingPercentileBucketSize_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int value = hystrixConfigurationService.GetMetricsRollingPercentileBucketSize(); Assert.Equal(3000, value); }
public void Returns_CommandTimeoutInMilliseconds_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var sut = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int result = sut.GetCommandTimeoutInMilliseconds(); Assert.Equal(1500, result); }
public void Returns_MetricsRollingStatisticalWindowInMilliseconds_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int value = hystrixConfigurationService.GetMetricsRollingStatisticalWindowInMilliseconds(); Assert.Equal(3000, value); }
public void Returns_20_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int value = hystrixConfigurationService.GetCircuitBreakerRequestVolumeThreshold(); Assert.Equal(20, value); }
public void Returns_CircuitBreakerRequestVolumeThreshold_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixLocalConfigurationService(hystrixCommandIdentifier, options); // Act int value = hystrixConfigurationService.GetCircuitBreakerRequestVolumeThreshold(); Assert.Equal(50000, value); }