Skip to content

Correct asserts on booleans in parametrized tests #248

Closed
@EgorkaKulikov

Description

@EgorkaKulikov

Description

Parametrized test method is created with incorrect assert statement

To Reproduce

Create parametrized tests with JUnit5 and NoMocks options for IntExamples.orderCheck

Expected behavior

Generated tests code contains assert that actual return values is equal to expected

Actual behavior

Test method is generated is follows

@ParameterizedTest
    @MethodSource("provideDataForOrderCheck")
    public void parameterizedTestsForOrderCheck(IntExamples intExamples,
                                                int int1, int int2, int int3, Boolean expectedResult) {
        boolean actual = intExamples.orderCheck(int1, int2, int3);
        assertFalse(Boolean.valueOf(actual));
    }

It always fails when actual values is true.

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generatorctg-bugIssue is a bugpriority-top-focusTop priority chosen by dev team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions