Tests SingleCheck.
| 28 | * Tests {@link SingleCheck}. |
| 29 | */ |
| 30 | @RunWith(JUnit4.class) |
| 31 | public class SingleCheckTest { |
| 32 | @Test(expected = NullPointerException.class) |
| 33 | public void create_nullPointerException() { |
| 34 | SingleCheck.provider(null); |
| 35 | } |
| 36 | |
| 37 | @Test |
| 38 | public void get() { |
| 39 | AtomicInteger integer = new AtomicInteger(); |
| 40 | Provider<Integer> provider = SingleCheck.provider(integer::getAndIncrement); |
| 41 | assertThat(provider.get()).isEqualTo(0); |
| 42 | assertThat(provider.get()).isEqualTo(0); |
| 43 | assertThat(provider.get()).isEqualTo(0); |
| 44 | } |
| 45 | } |
nothing calls this directly
no outgoing calls
no test coverage detected