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

update migrator for junit4 #420

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,7 @@ public static MigrationImpl devon4j() {
.and() //
.next().to(VersionIdentifier.ofDevon4j("3.2.0")) //
.pom().replaceProperty("devon4j.version", "3.2.0") //
.replaceString("com.devonfw.module.test.common.api.category.CategorySystemTest", "system")
.replaceString(
"com.devonfw.module.test.common.api.category.CategoryComponentTest,com.devonfw.module.test.common.api.category.CategorySubsystemTest,com.devonfw.module.test.common.api.category.CategorySystemTest",
"component,subsystem,system")
.replaceString(
"com.devonfw.module.test.common.api.category.CategorySubsystemTest,com.devonfw.module.test.common.api.category.CategorySystemTest",
"subsystem,system")
.replaceDependency(new VersionIdentifier("junit", "junit", null),
new VersionIdentifier("org.junit.jupiter", "junit-jupiter-engine", null, VersionIdentifier.SCOPE_TEST))
.addDependency(new VersionIdentifier("*-core", null),
new VersionIdentifier("org.junit.platform", "junit-platform-runner", null, VersionIdentifier.SCOPE_TEST))
.and().java()
.replace("import org.junit.Test;",
"import org.junit.jupiter.api.extension.ExtendWith;\n import org.junit.jupiter.api.Test;\n import org.springframework.test.context.junit.jupiter.SpringExtension;")
.replace("@RunWith(SpringRunner.class)", "@ExtendWith(SpringExtension.class)")
.replace("com.devonfw.module.jpa.dataaccess.api.RevisionMetadata",
"com.devonfw.module.basic.common.api.RevisionMetadata")
.replace("com.devonfw.module.jpa.dataaccess.api.RevisionMetadataType",
Expand All @@ -176,7 +162,13 @@ public static MigrationImpl devon4j() {
.pom().replaceProperty("devon4j.version", "2020.04.001") //
.replaceDependency(new VersionIdentifier("com.devonfw.java.modules", "devon4j-beanmapping", null),
new VersionIdentifier("com.devonfw.java.modules", "devon4j-beanmapping-dozer", null))
.and().java().replace("new PageRequest", "PageRequest.of").replace("new Sort", "Sort.by").and().next().build();
.and().java().replace("new PageRequest", "PageRequest.of").replace("new Sort", "Sort.by").and().next()
.to(VersionIdentifier.ofDevon4j("2020.04.002")).pom().replaceProperty("devon4j.version", "2020.04.002") //
.replaceDependency(
new VersionIdentifier("com.devonfw.java.modules", "devon4j-test", null, VersionIdentifier.SCOPE_TEST),
new VersionIdentifier("com.devonfw.java.modules", "devon4j-test-junit4", null,
VersionIdentifier.SCOPE_TEST))
.and().next().build();
}

}