@Test public void shouldConvertToJavaStream() { final Value<Integer> value = of(1, 2, 3); final java.util.stream.Stream<Integer> s1 = value.toJavaStream(); if (value.isSingleValued()) { final java.util.stream.Stream<Integer> s2 = java.util.stream.Stream.of(1); assertThat(List.ofAll(s1::iterator)).isEqualTo(List.ofAll(s2::iterator)); } else { final java.util.stream.Stream<Integer> s2 = java.util.stream.Stream.of(1, 2, 3); assertThat(List.ofAll(s1::iterator)).isEqualTo(List.ofAll(s2::iterator)); } }
@Test public void shouldConvertToSeq() { final Seq<?> actual = createIntTuple(1, 0, 0, 0).toSeq(); assertThat(actual).isEqualTo(List.ofAll(1, 0, 0, 0)); }