Closed
Description
Description
In Java 11 there is a new static method introduced: Predicate.not()
Add its support for test generation.
To Reproduce
Steps to reproduce the behavior:
- Set useFuzzing=false in settings.properties
- A project with JDK 11 is opened in IntelliJ IDEA
- Add the following Java class to it:
import java.util.function.Predicate;
public class test {
public boolean testIsEqual(int a) {
if (Predicate.isEqual(5).test(a)) {
return true;
} else {
return false;
}
}
public boolean testNot(int a) {
if (Predicate.not(i -> i.equals(5)).test(a)) {
return true;
} else {
return false;
}
}
}
- Create tests with UTBot... for testIsEqual
- Create tests with UTBot... for testNot
Expected behavior
4,5 Tests are generated successfully
Actual behavior
- Tests are generated
- Failed to generate tests error dialog is displayed.
Environment
IDEA 2022.1.3
Gradle project with JDK 11
Metadata
Metadata
Labels
Type
Projects
Status
Done