1 |
package dk.thoerup.circuitbreaker; |
package dk.thoerup.circuitbreaker; |
2 |
|
|
3 |
|
import static org.junit.Assert.assertTrue; |
4 |
|
|
5 |
import java.io.IOException; |
import java.io.IOException; |
6 |
|
|
7 |
import org.junit.*; |
import org.junit.Before; |
8 |
import static org.junit.Assert.*; |
import org.junit.Test; |
9 |
|
|
10 |
import dk.thoerup.circuitbreaker.AccountingCircuitBreaker; |
import dk.thoerup.circuitbreaker.config.StaticConfig; |
11 |
|
|
12 |
public class TestAccountingCircuitBreaker { |
public class TestAccountingCircuitBreaker { |
13 |
public static final int DELAY = 50; |
public static final int DELAY = 50; |
17 |
AccountingCircuitBreaker acb; |
AccountingCircuitBreaker acb; |
18 |
|
|
19 |
@Before public void setup() { |
@Before public void setup() { |
20 |
acb = new AccountingCircuitBreaker("test", THRESHOLD, DELAY); |
acb = new AccountingCircuitBreaker("test", new StaticConfig(THRESHOLD, DELAY) ); |
21 |
} |
} |
22 |
|
|
23 |
@Test public void initialValues() { |
@Test public void initialValues() { |