Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

import JUnit5 @Timeout is missing #1982

Open
Assignees
Labels
comp-codegenIssue is related to code generator ctg-bugIssue is a bug lang-javaIssue is related to Java support
@alisevych

Description

Description

import JUnit5 @timeout is missing
There is full class name of Timeout annotation used in code: @org.junit.jupiter.api.Timeout instead of short @Timeout

To Reproduce

  1. Run the 'utbot' project in IntelliJ Idea 2022年2月4日 Ultimate
  2. Install plugin built from unit-test-bot/rc3102023 branch
  3. Generate JUnit5 tests for CommonMocksExample.doNotMockHashCode()
  4. Open the generated test

Expected behavior

Timeout interface is expected to be imported.
@Timeout annotation is expected to be used by its short name

Actual behavior

Full class name of Timeout annotation is used:
@org.junit.jupiter.api.Timeout
Import is missing.

Visual proofs (screenshots, logs, images)

 @Test
 @DisplayName("doNotMockHashCode: exampleClass = ExampleClass(int)")
 @org.junit.jupiter.api.Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)
 public void testDoNotMockHashCode1() {
 ...
 }

Environment

Windows 10 Pro
IntelliJ IDEA 2022年2月4日 Ultimate

Metadata

Metadata

Labels

comp-codegenIssue is related to code generator ctg-bugIssue is a bug lang-javaIssue is related to Java support

Type

No type

Projects

Status

Todo

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /