BAEL-6228 Updated test names (#13571)

This commit is contained in:
Eugene Kovko
2023-03-02 18:22:53 +01:00
committed by GitHub
parent 78fc83b30d
commit cfedf55a29
6 changed files with 45 additions and 36 deletions
@@ -1,17 +0,0 @@
package com.baeldung.pipeline.functional;
import java.util.function.BiFunction;
import java.util.function.Function;
public class BiFunctionExample {
public static void main(String[] args) {
BiFunction<Integer, Integer, Integer> add = Integer::sum;
BiFunction<Integer, Integer, Integer> mul = (a, b) -> a * b;
Function<Integer, String> toString = Object::toString;
BiFunction<Integer, Integer, String> pipeline
= add.andThen(a -> mul.apply(a, 2)).andThen(toString);
String result = pipeline.apply(1, 2);
System.out.println(result);
}
}
@@ -1,17 +0,0 @@
package com.baeldung.pipeline.functional;
import java.util.function.Function;
public class FunctionExample {
public static void main(String[] args) {
Function<Integer, Integer> square = s -> s * s;
Function<Integer, Integer> half = s -> s / 2;
Function<Integer, String> toString = Object::toString;
Function<Integer, String> pipeline = square.andThen(half)
.andThen(toString);
String result = pipeline.apply(5);
System.out.println(result);
}
}