Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Mar 19, 2024
1 parent 1340643 commit 71f7cc8
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.openrewrite.gradle.spring;

import org.junit.jupiter.api.Test;
import org.openrewrite.FileAttributes;
import org.openrewrite.Tree;
import org.openrewrite.config.Environment;
import org.openrewrite.marker.BuildTool;
Expand Down Expand Up @@ -80,6 +81,9 @@ void upgradeGradleWrapperAndPlugins() {
dependencies {
implementation "org.springframework.boot:spring-boot-starter-web"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
""".formatted(version.group());
})
//language=gradle
Expand Down Expand Up @@ -111,7 +115,9 @@ void upgradeGradleWrapperAndPlugins() {
assertThat(after).isNotBlank();
return after + "\n";
}).afterRecipe(gradlew -> {
assertThat(gradlew.getFileAttributes().isReadable()).isTrue();
assertThat(gradlew.getFileAttributes())
.isNotNull()
.matches(FileAttributes::isReadable);
assertThat(gradlew.getFileAttributes().isExecutable()).isTrue();
})
),
Expand Down Expand Up @@ -167,6 +173,9 @@ implementation platform("org.springframework.boot:spring-boot-dependencies:2.6.1
implementation platform("org.springframework.boot:spring-boot-dependencies:%s")
implementation "org.springframework.boot:spring-boot-starter-web"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
""".formatted(version.group(), version.group());
})
),
Expand Down Expand Up @@ -197,7 +206,8 @@ implementation platform("org.springframework.boot:spring-boot-dependencies:%s")
assertThat(after).isNotBlank();
return after + "\n";
}).afterRecipe(gradlew -> {
assertThat(gradlew.getFileAttributes().isReadable()).isTrue();
assertThat(gradlew.getFileAttributes()).isNotNull()
.matches(FileAttributes::isReadable);
assertThat(gradlew.getFileAttributes().isExecutable()).isTrue();
})
),
Expand Down

0 comments on commit 71f7cc8

Please sign in to comment.