Skip to content

Create only required methods in UtUtils class #1924

Open
@EgorkaKulikov

Description

@EgorkaKulikov

Description

Patch standard IntExamples a little, add the following constructor

 public IntExamples() {
        System.out.println("Vse ploxo!");
    }

Generate tests for max method.

This generation requires UtUtils class creation. But method createInstance only is required (and dependent getUnsafeInstance too).

Expected behavior

No other util methods should be located in UtUtils class (e.g. createArray - it is useless)
Actually, we see all supported in UtBot util methods in the generated code of util class.

Context

This behaviour seems to be the original design.
We select only required util methods when locate them in the test class, but having other util class we don't apply any filtering.

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generatorctg-enhancementNew feature, improvement or change requestlang-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