Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test: migrate PathTest to JUnit 5 #4479

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

MartinWitt
Copy link
Collaborator

Change Log

The following bad smells are refactored:

Junit4-@before

The JUnit 4 @Before annotation should be replaced with JUnit 5 @BeforeEach annotation.

JUnit4-@test

The JUnit 4 @Test annotation should be replaced with JUnit 5 @Test annotation.

The following has changed in the code:

JUnit4-@test

  • Replaced junit 4 test annotation with junit 5 test annotation in testBuilderMethod
  • Replaced junit 4 test annotation with junit 5 test annotation in testBuilder
  • Replaced junit 4 test annotation with junit 5 test annotation in testPathFromString
  • Replaced junit 4 test annotation with junit 5 test annotation in testMultiPathFromString
  • Replaced junit 4 test annotation with junit 5 test annotation in testIncorrectPathFromString
  • Replaced junit 4 test annotation with junit 5 test annotation in testGetPathFromNonParent
  • Replaced junit 4 test annotation with junit 5 test annotation in testWildcards
  • Replaced junit 4 test annotation with junit 5 test annotation in testFastPathWithIndex
  • Replaced junit 4 test annotation with junit 5 test annotation in testRoles
  • Replaced junit 4 test annotation with junit 5 test annotation in testAmbiguousTypeMembers
  • Replaced junit 4 test annotation with junit 5 test annotation in toStringTest
  • Replaced junit 4 test annotation with junit 5 test annotation in exceptionTest
  • Replaced junit 4 test annotation with junit 5 test annotation in testGenericTypeReferenceInSuperType
  • Replaced junit 4 test annotation with junit 5 test annotation in testSignatureOfVarargMethod
  • Replaced junit 4 test annotation with junit 5 test annotation in testAmbiguousName
  • Replaced junit 4 test annotation with junit 5 test annotation in testFieldOfArrayType

Junit4-@before

  • Replaced @Before annotation with @BeforeEach at method setup

AssertionsTransformation

  • Transformed junit4 assert to junit 5 assertion in equals
  • Transformed junit4 assert to junit 5 assertion in equalsSet
  • Transformed junit4 assert to junit 5 assertion in testMultiPathFromString
  • Transformed junit4 assert to junit 5 assertion in testIncorrectPathFromString
  • Transformed junit4 assert to junit 5 assertion in testGetPathFromNonParent
  • Transformed junit4 assert to junit 5 assertion in testFastPathWithIndex
  • Transformed junit4 assert to junit 5 assertion in testRoles
  • Transformed junit4 assert to junit 5 assertion in testAmbiguousTypeMembers
  • Transformed junit4 assert to junit 5 assertion in comparePath
  • Transformed junit4 assert to junit 5 assertion in exceptionTest
  • Transformed junit4 assert to junit 5 assertion in testGenericTypeReferenceInSuperType
  • Transformed junit4 assert to junit 5 assertion in testSignatureOfVarargMethod
  • Transformed junit4 assert to junit 5 assertion in testAmbiguousName
  • Transformed junit4 assert to junit 5 assertion in testFieldOfArrayType

 The following has changed in the code:
Replaced @before annotation with @beforeeach at method setup
Replaced junit 4 test annotation with junit 5 test annotation in testBuilderMethod
Replaced junit 4 test annotation with junit 5 test annotation in testBuilder
Replaced junit 4 test annotation with junit 5 test annotation in testPathFromString
Replaced junit 4 test annotation with junit 5 test annotation in testMultiPathFromString
Replaced junit 4 test annotation with junit 5 test annotation in testIncorrectPathFromString
Replaced junit 4 test annotation with junit 5 test annotation in testGetPathFromNonParent
Replaced junit 4 test annotation with junit 5 test annotation in testWildcards
Replaced junit 4 test annotation with junit 5 test annotation in testFastPathWithIndex
Replaced junit 4 test annotation with junit 5 test annotation in testRoles
Replaced junit 4 test annotation with junit 5 test annotation in testAmbiguousTypeMembers
Replaced junit 4 test annotation with junit 5 test annotation in toStringTest
Replaced junit 4 test annotation with junit 5 test annotation in exceptionTest
Replaced junit 4 test annotation with junit 5 test annotation in testGenericTypeReferenceInSuperType
Replaced junit 4 test annotation with junit 5 test annotation in testSignatureOfVarargMethod
Replaced junit 4 test annotation with junit 5 test annotation in testAmbiguousName
Replaced junit 4 test annotation with junit 5 test annotation in testFieldOfArrayType
Transformed junit4 assert to junit 5 assertion in equals
Transformed junit4 assert to junit 5 assertion in equalsSet
Transformed junit4 assert to junit 5 assertion in testMultiPathFromString
Transformed junit4 assert to junit 5 assertion in testIncorrectPathFromString
Transformed junit4 assert to junit 5 assertion in testGetPathFromNonParent
Transformed junit4 assert to junit 5 assertion in testFastPathWithIndex
Transformed junit4 assert to junit 5 assertion in testRoles
Transformed junit4 assert to junit 5 assertion in testAmbiguousTypeMembers
Transformed junit4 assert to junit 5 assertion in comparePath
Transformed junit4 assert to junit 5 assertion in exceptionTest
Transformed junit4 assert to junit 5 assertion in testGenericTypeReferenceInSuperType
Transformed junit4 assert to junit 5 assertion in testSignatureOfVarargMethod
Transformed junit4 assert to junit 5 assertion in testAmbiguousName
Transformed junit4 assert to junit 5 assertion in testFieldOfArrayType
@monperrus monperrus merged commit 577b1e3 into INRIA:master Jan 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants