Search in sources :

Example 51 with IntStream

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

the class Assertions_assertThat_with_IntStream_Test method should_not_consume_stream_when_asserting_non_null.

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

Example 52 with IntStream

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

the class Assertions_assertThat_with_IntStream_Test method isInstanceOf_should_check_the_original_stream_without_consuming_it.

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

Example 53 with IntStream

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

the class Assertions_assertThat_with_IntStream_Test method isInstanceOfAny_should_check_the_original_stream_without_consuming_it.

@Test
void isInstanceOfAny_should_check_the_original_stream_without_consuming_it() {
    IntStream stream = mock(IntStream.class);
    assertThat(stream).isInstanceOfAny(IntStream.class, String.class);
    verifyNoInteractions(stream);
}
Also used : IntStream(java.util.stream.IntStream) Test(org.junit.jupiter.api.Test)

Example 54 with IntStream

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

the class Assertions_assertThat_with_IntStream_Test method isSameAs_should_check_the_original_stream_without_consuming_it.

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

Example 55 with IntStream

use of java.util.stream.IntStream in project dharma2018 by impredator.

the class CreateIntRange method main.

public static void main(String[] args) {
    IntStream oneToFive = IntStream.range(1, 6);
    // IntStream oneToFive  = IntStream.rangeClosed(1, 5);
    oneToFive.forEach(System.out::println);
}
Also used : IntStream(java.util.stream.IntStream)

Aggregations

IntStream (java.util.stream.IntStream)96 List (java.util.List)19 Test (org.junit.jupiter.api.Test)17 ArrayList (java.util.ArrayList)15 Stream (java.util.stream.Stream)12 Test (org.junit.Test)12 Arrays (java.util.Arrays)11 Map (java.util.Map)10 Collectors (java.util.stream.Collectors)9 Random (java.util.Random)7 DoubleStream (java.util.stream.DoubleStream)6 LongStream (java.util.stream.LongStream)6 Function (java.util.function.Function)5 Pattern (java.util.regex.Pattern)5 DecimalBoxFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.decimalBox.definition.DecimalBoxFieldDefinition)5 MultipleSubFormFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.multipleSubform.definition.MultipleSubFormFieldDefinition)5 SubFormFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.subForm.definition.SubFormFieldDefinition)5 FieldDefinition (org.kie.workbench.common.forms.model.FieldDefinition)5 LayoutRow (org.uberfire.ext.layout.editor.api.editor.LayoutRow)5 LayoutTemplate (org.uberfire.ext.layout.editor.api.editor.LayoutTemplate)5