Skip to content

Updating JDK to 17 and GSON to 2.8.9 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: start
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Count items in a stream after performing a few operations with streams
  • Loading branch information
SylvesterLoreto committed Jul 15, 2023
commit 1a505c409d48edaafdaaed49809f2af8bff24b4f
16 changes: 0 additions & 16 deletions src/test/java/com/amigoscode/examples/WorkingWithStreams.java

This file was deleted.

25 changes: 25 additions & 0 deletions src/test/java/com/amigoscode/examples/WorkingWithStreamsTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.amigoscode.examples;

import org.junit.jupiter.api.Test;

import java.util.List;
import java.util.stream.Stream;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

class WorkingWithStreamsTest {

@Test
void count_items_on_stream() {
var names = List.of("Amigoscode", "Alex", "Zara");
var stream = names.stream();

var count = stream.limit(2)
.map(null)
.sorted(null)
.dropWhile(null)
.count();

assertThat(count).isEqualTo(2);
}
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy