public void Returns_100_If_AppSetting_Is_Not_A_Valid_Integer() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupC", "DependencyZ"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsRollingPercentileBucketSize(); Assert.Equal(100, value); }
public void Returns_MetricsRollingPercentileWindowBuckets_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsRollingPercentileWindowBuckets(); Assert.Equal(3000, value); }
public void Returns_MetricsRollingPercentileBucketSize_AppSetting_As_Integer_For_GroupB_And_DependencyY() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupB", "DependencyY"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsRollingPercentileBucketSize(); Assert.Equal(1500, value); }
public void Returns_CircuitBreakerErrorThresholdPercentage_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCircuitBreakerErrorThresholdPercentage(); Assert.Equal(25, value); }
public void Returns_1000_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCommandTimeoutInMilliseconds(); Assert.Equal(1000, value); }
public void Returns_True_If_AppSetting_Is_Not_A_Valid_Integer() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupC", "DependencyZ"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetHystrixCommandEnabled(); Assert.True(value); }
public void Returns_GetCircuitBreakerForcedOpen_AppSetting_As_Boolean_For_GroupB_And_DependencyY() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupB", "DependencyY"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetCircuitBreakerForcedOpen(); Assert.Equal(false, value); }
public void Returns_MetricsHealthSnapshotIntervalInMilliseconds_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsHealthSnapshotIntervalInMilliseconds(); Assert.Equal(3000, value); }
public void Returns_500_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsHealthSnapshotIntervalInMilliseconds(); Assert.Equal(500, value); }
public void Returns_20_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCircuitBreakerRequestVolumeThreshold(); Assert.Equal(20, value); }
public void Returns_CommandTimeoutInMilliseconds_AppSetting_As_Integer_For_GroupB_And_DependencyY() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupB", "DependencyY"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCommandTimeoutInMilliseconds(); Assert.Equal(750, value); }
public void Returns_20_If_AppSetting_Is_Not_A_Valid_Integer() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupC", "DependencyZ"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCircuitBreakerRequestVolumeThreshold(); Assert.Equal(20, value); }
public void Returns_CircuitBreakerRequestVolumeThreshold_AppSetting_As_Integer_For_GroupB_And_DependencyY() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupB", "DependencyY"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCircuitBreakerRequestVolumeThreshold(); Assert.Equal(45000, value); }
public void Returns_CircuitBreakerSleepWindowInMilliseconds_AppSetting_As_Integer_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCircuitBreakerSleepWindowInMilliseconds(); Assert.Equal(6000, value); }
public void Returns_100_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsRollingPercentileBucketSize(); Assert.Equal(100, value); }
public void Returns_MetricsRollingStatisticalWindowInMilliseconds_AppSetting_As_Integer_For_GroupB_And_DependencyY() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupB", "DependencyY"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetMetricsRollingStatisticalWindowInMilliseconds(); Assert.Equal(1500, value); }
public void Returns_HystrixCommandEnabled_AppSetting_As_Boolean_For_GroupB_And_DependencyY() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupB", "DependencyY"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetHystrixCommandEnabled(); Assert.False(value); }
public void Returns_1000_If_AppSetting_Is_Not_A_Valid_Integer() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupC", "DependencyZ"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act int value = hystrixConfigurationService.GetCommandTimeoutInMilliseconds(); Assert.Equal(1000, value); }
public void Returns_True_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetHystrixCommandEnabled(); Assert.True(value); }
public void Returns_MetricsRollingPercentileEnabled_AppSetting_As_Boolean_For_GroupA_And_DependencyX() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupA", "DependencyX"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetMetricsRollingPercentileEnabled(); Assert.True(value); }
public void Returns_False_If_AppSetting_Is_Not_A_Valid_Boolean() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("GroupC", "DependencyZ"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetCircuitBreakerForcedOpen(); Assert.Equal(false, value); }
public void Returns_False_If_AppSetting_Does_Not_Exist() { var hystrixCommandIdentifier = new HystrixCommandIdentifier("NonExistingGroup", "NonExistingCommand"); var hystrixConfigurationService = new HystrixWebConfigConfigurationService(hystrixCommandIdentifier); // act bool value = hystrixConfigurationService.GetCircuitBreakerForcedClosed(); Assert.Equal(false, value); }