Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

test: migrate PositionTest to JUnit 5 #4503

Merged
merged 1 commit into from
Jan 16, 2022

Conversation

MartinWitt
Copy link
Collaborator

#3919

Change Log

The following bad smells are refactored:

JUnit4-@test

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

JUnit4Assertion

The JUnit4 assertion should be replaced with JUnit5 Assertions.

The following has changed in the code:

JUnit4-@test

  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionClass
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionClassWithComments
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionParameterTypeReference
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionInterface
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionAnnotation
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionField
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionGeneric
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionTerminates
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionMethod
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionAbstractMethod
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionStatement
  • Replaced junit 4 test annotation with junit 5 test annotation in testSourcePosition
  • Replaced junit 4 test annotation with junit 5 test annotation in defaultConstructorPositionTest
  • Replaced junit 4 test annotation with junit 5 test annotation in getPositionOfImplicitBlock
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionMethodTypeParameter
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionOfAnnonymousType
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionOfAnnonymousTypeByNewInterface
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionOfCtImport
  • Replaced junit 4 test annotation with junit 5 test annotation in testEmptyModifiersOfMethod
  • Replaced junit 4 test annotation with junit 5 test annotation in testTypeModifiersPositionAfterComment
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionTryCatch
  • Replaced junit 4 test annotation with junit 5 test annotation in testArrayArgParameter
  • Replaced junit 4 test annotation with junit 5 test annotation in testExpressions
  • Replaced junit 4 test annotation with junit 5 test annotation in testCatchPosition
  • Replaced junit 4 test annotation with junit 5 test annotation in testEnumConstructorCallComment
  • Replaced junit 4 test annotation with junit 5 test annotation in testSwitchCase
  • Replaced junit 4 test annotation with junit 5 test annotation in testFooForEach
  • Replaced junit 4 test annotation with junit 5 test annotation in testEndColumn
  • Replaced junit 4 test annotation with junit 5 test annotation in testFirstLineColumn
  • Replaced junit 4 test annotation with junit 5 test annotation in testSingleLineClassColumn
  • Replaced junit 4 test annotation with junit 5 test annotation in testLabel
  • Replaced junit 4 test annotation with junit 5 test annotation in testNestedLabels
  • Replaced junit 4 test annotation with junit 5 test annotation in testPackageDeclaration
  • Replaced junit 4 test annotation with junit 5 test annotation in testPackageDeclarationPosition
  • Replaced junit 4 test annotation with junit 5 test annotation in testImportPosition
  • Replaced junit 4 test annotation with junit 5 test annotation in testPackageDeclarationWithCommentPosition
  • Replaced junit 4 test annotation with junit 5 test annotation in testCommentedOutClass
  • Replaced junit 4 test annotation with junit 5 test annotation in testSourcePositionOfFieldReference
  • Replaced junit 4 test annotation with junit 5 test annotation in testPositionBuilderFailureIsCaugth
  • Replaced junit 4 test annotation with junit 5 test annotation in testNoClasspathVariableAccessInInnerClass1
  • Replaced junit 4 test annotation with junit 5 test annotation in testNoClasspathVariableAccessInInnerClass2
  • Replaced junit 4 test annotation with junit 5 test annotation in testNoClasspathVariableAccessInInnerInterface
  • Replaced junit 4 test annotation with junit 5 test annotation in testLinePositionOkWithOneLineClassCode
  • Replaced junit 4 test annotation with junit 5 test annotation in testLambdaParameterPosition
  • Replaced junit 4 test annotation with junit 5 test annotation in testLambdaParameterPosition1

JUnit4Assertion

  • Transformed junit4 assert to junit 5 assertion in testPositionClass
  • Transformed junit4 assert to junit 5 assertion in testPositionClassWithComments
  • Transformed junit4 assert to junit 5 assertion in testPositionParameterTypeReference
  • Transformed junit4 assert to junit 5 assertion in testPositionInterface
  • Transformed junit4 assert to junit 5 assertion in testPositionAnnotation
  • Transformed junit4 assert to junit 5 assertion in testPositionField
  • Transformed junit4 assert to junit 5 assertion in testPositionGeneric
  • Transformed junit4 assert to junit 5 assertion in testPositionMethod
  • Transformed junit4 assert to junit 5 assertion in testPositionAbstractMethod
  • Transformed junit4 assert to junit 5 assertion in testPositionStatement
  • Transformed junit4 assert to junit 5 assertion in testSourcePosition
  • Transformed junit4 assert to junit 5 assertion in assertFails
  • Transformed junit4 assert to junit 5 assertion in defaultConstructorPositionTest
  • Transformed junit4 assert to junit 5 assertion in getPositionOfImplicitBlock
  • Transformed junit4 assert to junit 5 assertion in testPositionMethodTypeParameter
  • Transformed junit4 assert to junit 5 assertion in testPositionOfAnnonymousType
  • Transformed junit4 assert to junit 5 assertion in testPositionOfAnnonymousTypeByNewInterface
  • Transformed junit4 assert to junit 5 assertion in testPositionOfCtImport
  • Transformed junit4 assert to junit 5 assertion in testEmptyModifiersOfMethod
  • Transformed junit4 assert to junit 5 assertion in testTypeModifiersPositionAfterComment
  • Transformed junit4 assert to junit 5 assertion in testPositionTryCatch
  • Transformed junit4 assert to junit 5 assertion in testArrayArgParameter
  • Transformed junit4 assert to junit 5 assertion in testExpressions
  • Transformed junit4 assert to junit 5 assertion in testCatchPosition
  • Transformed junit4 assert to junit 5 assertion in testEnumConstructorCallComment
  • Transformed junit4 assert to junit 5 assertion in testSwitchCase
  • Transformed junit4 assert to junit 5 assertion in testFooForEach
  • Transformed junit4 assert to junit 5 assertion in testEndColumn
  • Transformed junit4 assert to junit 5 assertion in testFirstLineColumn
  • Transformed junit4 assert to junit 5 assertion in testSingleLineClassColumn
  • Transformed junit4 assert to junit 5 assertion in testLabel
  • Transformed junit4 assert to junit 5 assertion in testNestedLabels
  • Transformed junit4 assert to junit 5 assertion in testPackageDeclaration
  • Transformed junit4 assert to junit 5 assertion in testPackageDeclarationPosition
  • Transformed junit4 assert to junit 5 assertion in testImportPosition
  • Transformed junit4 assert to junit 5 assertion in testPackageDeclarationWithCommentPosition
  • Transformed junit4 assert to junit 5 assertion in testCommentedOutClass
  • Transformed junit4 assert to junit 5 assertion in testSourcePositionOfFieldReference
  • Transformed junit4 assert to junit 5 assertion in testPositionBuilderFailureIsCaugth
  • Transformed junit4 assert to junit 5 assertion in testNoClasspathVariableAccessInInnerClass1
  • Transformed junit4 assert to junit 5 assertion in testNoClasspathVariableAccessInInnerClass2
  • Transformed junit4 assert to junit 5 assertion in testNoClasspathVariableAccessInInnerInterface
  • Transformed junit4 assert to junit 5 assertion in testLinePositionOkWithOneLineClassCode
  • Transformed junit4 assert to junit 5 assertion in testLambdaParameterPosition
  • Transformed junit4 assert to junit 5 assertion in testLambdaParameterPosition1

 The following has changed in the code:
Replaced junit 4 test annotation with junit 5 test annotation in testPositionClass
Replaced junit 4 test annotation with junit 5 test annotation in testPositionClassWithComments
Replaced junit 4 test annotation with junit 5 test annotation in testPositionParameterTypeReference
Replaced junit 4 test annotation with junit 5 test annotation in testPositionInterface
Replaced junit 4 test annotation with junit 5 test annotation in testPositionAnnotation
Replaced junit 4 test annotation with junit 5 test annotation in testPositionField
Replaced junit 4 test annotation with junit 5 test annotation in testPositionGeneric
Replaced junit 4 test annotation with junit 5 test annotation in testPositionTerminates
Replaced junit 4 test annotation with junit 5 test annotation in testPositionMethod
Replaced junit 4 test annotation with junit 5 test annotation in testPositionAbstractMethod
Replaced junit 4 test annotation with junit 5 test annotation in testPositionStatement
Replaced junit 4 test annotation with junit 5 test annotation in testSourcePosition
Replaced junit 4 test annotation with junit 5 test annotation in defaultConstructorPositionTest
Replaced junit 4 test annotation with junit 5 test annotation in getPositionOfImplicitBlock
Replaced junit 4 test annotation with junit 5 test annotation in testPositionMethodTypeParameter
Replaced junit 4 test annotation with junit 5 test annotation in testPositionOfAnnonymousType
Replaced junit 4 test annotation with junit 5 test annotation in testPositionOfAnnonymousTypeByNewInterface
Replaced junit 4 test annotation with junit 5 test annotation in testPositionOfCtImport
Replaced junit 4 test annotation with junit 5 test annotation in testEmptyModifiersOfMethod
Replaced junit 4 test annotation with junit 5 test annotation in testTypeModifiersPositionAfterComment
Replaced junit 4 test annotation with junit 5 test annotation in testPositionTryCatch
Replaced junit 4 test annotation with junit 5 test annotation in testArrayArgParameter
Replaced junit 4 test annotation with junit 5 test annotation in testExpressions
Replaced junit 4 test annotation with junit 5 test annotation in testCatchPosition
Replaced junit 4 test annotation with junit 5 test annotation in testEnumConstructorCallComment
Replaced junit 4 test annotation with junit 5 test annotation in testSwitchCase
Replaced junit 4 test annotation with junit 5 test annotation in testFooForEach
Replaced junit 4 test annotation with junit 5 test annotation in testEndColumn
Replaced junit 4 test annotation with junit 5 test annotation in testFirstLineColumn
Replaced junit 4 test annotation with junit 5 test annotation in testSingleLineClassColumn
Replaced junit 4 test annotation with junit 5 test annotation in testLabel
Replaced junit 4 test annotation with junit 5 test annotation in testNestedLabels
Replaced junit 4 test annotation with junit 5 test annotation in testPackageDeclaration
Replaced junit 4 test annotation with junit 5 test annotation in testPackageDeclarationPosition
Replaced junit 4 test annotation with junit 5 test annotation in testImportPosition
Replaced junit 4 test annotation with junit 5 test annotation in testPackageDeclarationWithCommentPosition
Replaced junit 4 test annotation with junit 5 test annotation in testCommentedOutClass
Replaced junit 4 test annotation with junit 5 test annotation in testSourcePositionOfFieldReference
Replaced junit 4 test annotation with junit 5 test annotation in testPositionBuilderFailureIsCaugth
Replaced junit 4 test annotation with junit 5 test annotation in testNoClasspathVariableAccessInInnerClass1
Replaced junit 4 test annotation with junit 5 test annotation in testNoClasspathVariableAccessInInnerClass2
Replaced junit 4 test annotation with junit 5 test annotation in testNoClasspathVariableAccessInInnerInterface
Replaced junit 4 test annotation with junit 5 test annotation in testLinePositionOkWithOneLineClassCode
Replaced junit 4 test annotation with junit 5 test annotation in testLambdaParameterPosition
Replaced junit 4 test annotation with junit 5 test annotation in testLambdaParameterPosition1
Transformed junit4 assert to junit 5 assertion in testPositionClass
Transformed junit4 assert to junit 5 assertion in testPositionClassWithComments
Transformed junit4 assert to junit 5 assertion in testPositionParameterTypeReference
Transformed junit4 assert to junit 5 assertion in testPositionInterface
Transformed junit4 assert to junit 5 assertion in testPositionAnnotation
Transformed junit4 assert to junit 5 assertion in testPositionField
Transformed junit4 assert to junit 5 assertion in testPositionGeneric
Transformed junit4 assert to junit 5 assertion in testPositionMethod
Transformed junit4 assert to junit 5 assertion in testPositionAbstractMethod
Transformed junit4 assert to junit 5 assertion in testPositionStatement
Transformed junit4 assert to junit 5 assertion in testSourcePosition
Transformed junit4 assert to junit 5 assertion in assertFails
Transformed junit4 assert to junit 5 assertion in defaultConstructorPositionTest
Transformed junit4 assert to junit 5 assertion in getPositionOfImplicitBlock
Transformed junit4 assert to junit 5 assertion in testPositionMethodTypeParameter
Transformed junit4 assert to junit 5 assertion in testPositionOfAnnonymousType
Transformed junit4 assert to junit 5 assertion in testPositionOfAnnonymousTypeByNewInterface
Transformed junit4 assert to junit 5 assertion in testPositionOfCtImport
Transformed junit4 assert to junit 5 assertion in testEmptyModifiersOfMethod
Transformed junit4 assert to junit 5 assertion in testTypeModifiersPositionAfterComment
Transformed junit4 assert to junit 5 assertion in testPositionTryCatch
Transformed junit4 assert to junit 5 assertion in testArrayArgParameter
Transformed junit4 assert to junit 5 assertion in testExpressions
Transformed junit4 assert to junit 5 assertion in testCatchPosition
Transformed junit4 assert to junit 5 assertion in testEnumConstructorCallComment
Transformed junit4 assert to junit 5 assertion in testSwitchCase
Transformed junit4 assert to junit 5 assertion in testFooForEach
Transformed junit4 assert to junit 5 assertion in testEndColumn
Transformed junit4 assert to junit 5 assertion in testFirstLineColumn
Transformed junit4 assert to junit 5 assertion in testSingleLineClassColumn
Transformed junit4 assert to junit 5 assertion in testLabel
Transformed junit4 assert to junit 5 assertion in testNestedLabels
Transformed junit4 assert to junit 5 assertion in testPackageDeclaration
Transformed junit4 assert to junit 5 assertion in testPackageDeclarationPosition
Transformed junit4 assert to junit 5 assertion in testImportPosition
Transformed junit4 assert to junit 5 assertion in testPackageDeclarationWithCommentPosition
Transformed junit4 assert to junit 5 assertion in testCommentedOutClass
Transformed junit4 assert to junit 5 assertion in testSourcePositionOfFieldReference
Transformed junit4 assert to junit 5 assertion in testPositionBuilderFailureIsCaugth
Transformed junit4 assert to junit 5 assertion in testNoClasspathVariableAccessInInnerClass1
Transformed junit4 assert to junit 5 assertion in testNoClasspathVariableAccessInInnerClass2
Transformed junit4 assert to junit 5 assertion in testNoClasspathVariableAccessInInnerInterface
Transformed junit4 assert to junit 5 assertion in testLinePositionOkWithOneLineClassCode
Transformed junit4 assert to junit 5 assertion in testLambdaParameterPosition
Transformed junit4 assert to junit 5 assertion in testLambdaParameterPosition1
@slarse slarse merged commit bf60467 into INRIA:master Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants