Skip to content

The JUnit doc page should document a breaking change between JUnit 4 and JUnit 5 #515

@interrupt-routine

Description

@interrupt-routine

Page:

https://docs.codewars.com/languages/java/junit

Problem:

In JUnit 4, the optional message parameter comes first:

assertEquals( "1 + 1 should equal 2", 2, Adder.add(1, 1));

In JUnit 5, it comes last, which breaks compatibility:

assertEquals(2, Adder.add(1, 1), "1 + 1 should equal 2");

Proposed fixes:

  • document the optional message parameter for JUnit 4 (it is currently missing from the sample JUnit 4 tests suite)
  • add a paragraph about that breaking change somewhere in the page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions