@Test public void toIteratorNull(){ assertThat(Mutable.of(null).iterator().hasNext(),equalTo(false)); }
@Test public void toIterator(){ assertThat(Mutable.of(10).iterator().next(),equalTo(10)); } @Test
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); just.get(); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); just.get(); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); just.get(); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c -> capture.set(c)); assertNull(capture.get()); just.toOptional().get(); assertThat(capture.get(), equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); just.get(); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); just.get(); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c->capture.set(c)); just.get(); assertThat(capture.get(),equalTo(10)); }
@Test public void testPeek() { Mutable<Integer> capture = Mutable.of(null); just = just.peek(c -> capture.set(c)); assertNull(capture.get()); just.orElse(20); assertThat(capture.get(), equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c -> capture.set(c)); assertNull(capture.get()); just.forEach(c -> capture.set(c)); assertThat(capture.get(), equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }
@Test public void testForEach() { Mutable<Integer> capture = Mutable.of(null); none.forEach(c->capture.set(c)); assertNull(capture.get()); just.forEach(c->capture.set(c)); assertThat(capture.get(),equalTo(10)); }