Skip to content

Commit

Permalink
Make snakeyaml available on test classpath for rewrite-java
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Jun 12, 2020
1 parent 0a81961 commit c508353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions rewrite-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ dependencies {

implementation("org.ow2.asm:asm:latest.release")
implementation("org.ow2.asm:asm-util:latest.release")

testImplementation("org.yaml:snakeyaml:latest.release")
}

tasks.withType<Javadoc> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OrderImportsTest {
@Test
fun fromYaml() {
val yaml = Yaml()
val orderImportsConfig: Map<String, Object> = yaml.load("""
val orderImportsConfig: Map<String, Any> = yaml.load("""
removeUnused: true
layout:
classCountToUseStarImport: 5
Expand All @@ -38,7 +38,7 @@ class OrderImportsTest {
- import static all other imports
""".trimIndent())

val orderImports: OrderImports = OrderImports()
val orderImports = OrderImports()
ObjectMapper().updateValue(orderImports, orderImportsConfig)

assertThat(orderImports.layout.blocks[0]).isInstanceOf(OrderImports.Layout.Block.AllOthers::class.java)
Expand Down

0 comments on commit c508353

Please sign in to comment.