Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #676 from exoego/update-organizationId
Change groupId when dependencies published under a different groupId
- Loading branch information
Showing
11 changed files
with
112 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
modules/core/src/test/scala/org/scalasteward/core/update/UpdateServiceTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.scalasteward.core.update | ||
|
||
import org.scalasteward.core.data.{Dependency, Update} | ||
import org.scalasteward.core.util.Nel | ||
import org.scalatest.{FunSuite, Matchers} | ||
|
||
class UpdateServiceTest extends FunSuite with Matchers { | ||
|
||
test("findUpdateUnderNewGroup: returns empty if dep is not listed") { | ||
val original = new Dependency("org.spire-math", "UNKNOWN", "_2.12", "1.0.0") | ||
UpdateService.findUpdateUnderNewGroup(original) shouldBe None | ||
} | ||
|
||
test("findUpdateUnderNewGroup: returns Update.Single for updateing groupId") { | ||
val original = new Dependency("org.spire-math", "kind-projector", "_2.12", "0.9.0") | ||
UpdateService.findUpdateUnderNewGroup(original) shouldBe Some( | ||
Update.Single( | ||
"org.spire-math", | ||
"kind-projector", | ||
"0.9.0", | ||
Nel.of("0.10.0"), | ||
newerGroupId = Some("org.typelevel") | ||
) | ||
) | ||
} | ||
|
||
} |