Skip to content

Generate 2 parametrized tests instead of test with if-else inside #1140

Open

Description

@alisevych

Description

It's better to avoid conditions in tests.
Currently a parametrized test with if-else condition inside is generated.
The test changes the behavior basing on expected exception (NPE or not)

Expected behavior

It's better to avoid conditions and loops in tests where possible.
Suggestion for here: generate 2 parametrized tests: one expecting NPE and another one for other exceptions.

Environment

JRE 8 - 17 - ...

Context

Generate tests with UnitTestBot - RC build
with Parametrized tests checked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ctg-enhancementNew feature, improvement or change request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions