Search in sources :

Example 31 with DoubleStream

use of java.util.stream.DoubleStream in project assertj-core by joel-costigliola.

the class Assertions_assertThat_with_DoubleStream_Test method isInstanceOf_should_check_the_original_stream_without_consuming_it.

@Test
void isInstanceOf_should_check_the_original_stream_without_consuming_it() {
    DoubleStream stream = mock(DoubleStream.class);
    assertThat(stream).isInstanceOf(DoubleStream.class);
    verifyNoInteractions(stream);
}
Also used : DoubleStream(java.util.stream.DoubleStream) Test(org.junit.jupiter.api.Test)

Example 32 with DoubleStream

use of java.util.stream.DoubleStream in project assertj-core by joel-costigliola.

the class Assertions_assertThat_with_DoubleStream_Test method stream_can_be_asserted_twice.

@Test
void stream_can_be_asserted_twice() {
    DoubleStream names = DoubleStream.of(823952.8, 1947230585.9);
    assertThat(names).containsExactly(823952.8, 1947230585.9).containsExactly(823952.8, 1947230585.9);
}
Also used : DoubleStream(java.util.stream.DoubleStream) Test(org.junit.jupiter.api.Test)

Example 33 with DoubleStream

use of java.util.stream.DoubleStream in project assertj-core by joel-costigliola.

the class Assertions_assertThat_with_DoubleStream_Test method isOfAnyClassIn_should_check_the_original_stream_without_consuming_it.

@Test
void isOfAnyClassIn_should_check_the_original_stream_without_consuming_it() {
    DoubleStream stream = mock(DoubleStream.class);
    assertThat(stream).isOfAnyClassIn(Double.class, stream.getClass());
}
Also used : DoubleStream(java.util.stream.DoubleStream) Test(org.junit.jupiter.api.Test)

Example 34 with DoubleStream

use of java.util.stream.DoubleStream in project assertj-core by joel-costigliola.

the class Assertions_assertThat_with_DoubleStream_Test method should_not_consume_stream_when_asserting_non_null.

@Test
void should_not_consume_stream_when_asserting_non_null() {
    DoubleStream stream = mock(DoubleStream.class);
    assertThat(stream).isNotNull();
    verifyNoInteractions(stream);
}
Also used : DoubleStream(java.util.stream.DoubleStream) Test(org.junit.jupiter.api.Test)

Aggregations

DoubleStream (java.util.stream.DoubleStream)34 IntStream (java.util.stream.IntStream)11 Test (org.junit.jupiter.api.Test)10 List (java.util.List)9 Arrays (java.util.Arrays)7 Map (java.util.Map)6 Random (java.util.Random)6 Collectors (java.util.stream.Collectors)6 LongStream (java.util.stream.LongStream)6 Stream (java.util.stream.Stream)5 Collections (java.util.Collections)4 HashMap (java.util.HashMap)4 LinkedList (java.util.LinkedList)4 Function (java.util.function.Function)4 IgniteBiTuple (org.apache.ignite.lang.IgniteBiTuple)4 StorageConstants (org.apache.ignite.ml.math.StorageConstants)4 IgniteFunction (org.apache.ignite.ml.math.functions.IgniteFunction)4 SparseDistributedMatrix (org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix)4 DenseLocalOnHeapVector (org.apache.ignite.ml.math.impls.vector.DenseLocalOnHeapVector)4 LabeledVectorDouble (org.apache.ignite.ml.structures.LabeledVectorDouble)4