Skip to content

Commit

Permalink
fix streams solutions and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK committed Dec 3, 2024
1 parent 92d41d8 commit d8a5ff3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
1 change: 0 additions & 1 deletion java/concurrency/workers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tasks.javadoc {

repositories {
mavenCentral()
jcenter()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static <T> List<T> dup(final List<T> list, final UnaryOperator<T> op) {
/**
* @param list
* input list
* @param pre
* predicate to execute
* @param <T>
Expand Down
1 change: 0 additions & 1 deletion java/streams/utilities-for-music-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tasks.javadoc {

repositories {
mavenCentral()
jcenter()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.util.Set;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import java.util.stream.LongStream;
import java.util.stream.Stream;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,17 @@ void testAlbumNames() {
*/
@Test
void testOrderedSongNames() {
final List<String> result = Arrays.asList(new String[] {
"Black Dog",
"Dazed and Confused",
"I Can't Quit You Baby",
"Immigrant Song",
"Ramble On",
"That's the Way",
"Travelling Riverside Blues",
"When the Levee Breaks",
"Whole Lotta Love" });
final List<String> result = Arrays.asList(
"Black Dog",
"Dazed and Confused",
"I Can't Quit You Baby",
"Immigrant Song",
"Ramble On",
"That's the Way",
"Travelling Riverside Blues",
"When the Levee Breaks",
"Whole Lotta Love"
);
final List<String> actual = lz.orderedSongNames().collect(toList());
assertEquals(result, actual);
}
Expand All @@ -87,7 +88,7 @@ void testOrderedSongNames() {
*/
@Test
void testAlbumInYear() {
final List<String> result = Arrays.asList(new String[] { II, I });
final List<String> result = Arrays.asList(II, I);
final List<String> actual = lz.albumInYear(1969).collect(toList());
assertEquals(result, actual);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tasks.javadoc {

repositories {
mavenCentral()
jcenter()
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion tests.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ File("java/inheritance/").inAllDirectories {
gradle("compileJava")
}

listOf("collections", "generics", "exceptions", "lambdas").forEach {
listOf("collections", "generics", "exceptions", "lambdas", "streams").forEach {
File("java/$it").inAllDirectories {
val tasks = arrayOf("build") + when (git.currentBranch()) {
"exercises" -> arrayOf("-x", "test")
Expand Down

0 comments on commit d8a5ff3

Please sign in to comment.