-
Notifications
You must be signed in to change notification settings - Fork 0
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
add migration cleanup from junit 4 to junit 5 #110
Conversation
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
/** | ||
* | ||
*/ | ||
public JUnitCleanUpCore() { |
Check warning
Code scanning / PMD
Document empty constructor Warning
if (compilationUnit == null) { | ||
return null; | ||
} | ||
EnumSet<JUnitCleanUpFixCore> computeFixSet= computeFixSet(); |
Check warning
Code scanning / PMD
Avoid using implementation types like 'Stack'; use the interface instead Warning
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/ui/fix/JUnitCleanUpCore.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/ui/fix/JUnitCleanUpCore.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/ui/fix/JUnitCleanUpCore.java
Fixed
Show fixed
Hide fixed
throw new AbortSearchException(); | ||
} | ||
if (typeBinding.isArray()) { | ||
typeBinding= typeBinding.getElementType(); |
Check notice
Code scanning / Pmd (reported by Codacy)
Avoid reassigning parameters such as 'typeBinding'
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
7de4607
to
e000d49
Compare
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
...box_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/BeforeClassJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...box_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/BeforeClassJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/BeforeJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/BeforeJUnitPlugin.java
Fixed
Show fixed
Hide fixed
return true; | ||
} | ||
} | ||
return ((BiPredicate<SingleMemberAnnotation, E>) (this.helperVisitor.predicatemap.get(VisitorEnum.SingleMemberAnnotation))).test(node, this.helperVisitor.dataholder); |
Check warning
Code scanning / PMD
Useless parentheses. Warning
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/IgnoreJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/JunitHolder.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/JUnitCleanUpFixCore.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RunWithJUnitPlugin.java
Fixed
Show fixed
Hide fixed
0dd55c4
to
344fa98
Compare
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/AssertJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/AssertJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/AssertJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/AssertJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/AssertJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
if (typeBinding.getQualifiedName().equals(qualifiedname)) { | ||
return true; | ||
} | ||
typeBinding = typeBinding.getSuperclass(); |
Check notice
Code scanning / Pmd (reported by Codacy)
Avoid reassigning parameters such as 'typeBinding'
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
method.accept(new ASTVisitor() { | ||
@Override | ||
public boolean visit(MethodInvocation node) { | ||
if (node.getName().getIdentifier().equals("newFile")) { |
Check warning
Code scanning / PMD
Position literals first in String comparisons Warning
...ox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleTestnameJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup/src/org/sandbox/jdt/internal/ui/fix/JUnitCleanUpCore.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
sandbox_junit_cleanup_test/src/org/sandbox/jdt/ui/tests/quickfix/Java8CleanUpTest.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
..._cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...unit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/ExternalResourceJUnitPlugin.java
Fixed
Show fixed
Hide fixed
...ox_junit_cleanup/src/org/sandbox/jdt/internal/corext/fix/helper/RuleTestnameJUnitPlugin.java
Fixed
Show fixed
Hide fixed
@Override | ||
public String getPreview() { | ||
StringBuilder sb= new StringBuilder(); | ||
EnumSet<JUnitCleanUpFixCore> computeFixSet= computeFixSet(); |
Check warning
Code scanning / PMD
Avoid using implementation types like 'Stack'; use the interface instead Warning
a834dce
to
f7b69a9
Compare
IJavaProject fProject = getJavaProject(); | ||
fProject.setRawClasspath(getDefaultClasspath(), null); | ||
IClasspathEntry cpe= JavaCore.newContainerEntry(junitContainerPath); | ||
AbstractEclipseJava.addToClasspath(fProject, cpe); |
Check warning
Code scanning / PMD
Unnecessary qualifier 'AbstractEclipseJava': 'addSourceContainer' is already in scope Warning test
fProject.setRawClasspath(getDefaultClasspath(), null); | ||
IClasspathEntry cpe= JavaCore.newContainerEntry(junitContainerPath); | ||
AbstractEclipseJava.addToClasspath(fProject, cpe); | ||
fSourceFolder= AbstractEclipseJava.addSourceContainer(fProject, "src"); |
Check warning
Code scanning / PMD
Unnecessary qualifier 'AbstractEclipseJava': 'addSourceContainer' is already in scope Warning test
Cleanup to migrate Tests to JUnit5
At the time being only a subset of all possible apis of JUnit is supported.
@Before, @After
@BeforeClass, @AfterClass