UTBotJava
UTBotJava copied to clipboard
Import assertTrue is missing
Description
Junit5 assertTrue is used, but import is missing
To Reproduce
- Install UnitTestBot plugin built from main in IntelliJ IDEA
- Open
sm***tproject - Generate
Unit testswithNo configurationtests forFacet - Check generated test
Expected behavior
Generated test should have import of used asserts.
Actual behavior
Generated test is not compiling, assertTrue import is missing.
Screenshots, logs
The following imports are present:
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.utbot.runtime.utils.java.UtUtils.deepEquals;
The following line is present in generated test, that is not compiling:
assertTrue(deepEquals(arrayList, actual));
Environment
IntelliJ IDEA version - 2023.2 Ultimate Project - Maven JDK - 1.8
Seems that the problem is in the imports optimizer we currently use. May be we should think about another one.