Skip to content

Import assertTrue is missing #2616

Open
@alisevych

Description

@alisevych

Description

Junit5 assertTrue is used, but import is missing

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Open sm***t project
  3. Generate Unit tests with No configuration tests for Facet
  4. 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

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generatorcomp-springIssue is related to Spring projects supportctg-bugIssue is a bugspec-internalInternal issue

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions