MCPcopy Index your code
hub / github.com/google/dagger / SingleCheckTest

Class SingleCheckTest

javatests/dagger/internal/SingleCheckTest.java:30–45  ·  view source on GitHub ↗

Tests SingleCheck.

Source from the content-addressed store, hash-verified

28 * Tests {@link SingleCheck}.
29 */
30@RunWith(JUnit4.class)
31public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected