Skip to content

Commit

Permalink
#318 Unify test case setup
Browse files Browse the repository at this point in the history
; Conflicts:
;	htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/gradle/HtmlSanityCheckBaseSpec.groovy
;	htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/gradle/HtmlSanityCheckTaskFunctionalSpec.groovy
;	htmlSanityCheck-gradle-plugin/src/test/groovy/org/aim42/htmlsanitycheck/gradle/HtmlSanityCheckTaskSpec.groovy
  • Loading branch information
ascheman authored and Gerd Aschemann (EXT) committed Nov 19, 2024
1 parent fb32395 commit b99d77f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class HscCommandSpec extends Specification {
SecurityManager originalSecurityManager = System.getSecurityManager()
SecurityManager mockSecurityManager = new NoExitSecurityMock(originalSecurityManager)
System.setSecurityManager(mockSecurityManager)
String[] args = [testProjectDir.getRoot()]
String[] args = [testProjectDir.root]

when:
HscCommand.main(args)
Expand All @@ -94,7 +94,7 @@ class HscCommandSpec extends Specification {
def "test with valid HTML file"() {
given:
htmlFile << VALID_HTML
String[] args = [testProjectDir.getRoot()]
String[] args = [testProjectDir.root]

when:
HscCommand.main(args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HtmlReporterTest {
@Before
void setUp() {
runResults = new PerRunResults()
htmlReporter = new HtmlReporter(runResults, tempDir.getRoot().getAbsolutePath())
htmlReporter = new HtmlReporter(runResults, tempDir.root.getAbsolutePath())
}

@Test
Expand Down Expand Up @@ -189,7 +189,7 @@ class HtmlReporterTest {

private String getResultContents() {
htmlReporter.closeReport()
File reportFile = new File(tempDir.getRoot(), "index.html")
File reportFile = new File(tempDir.root, "index.html")
try {
String content = new String(Files.readAllBytes(reportFile.toPath()))
return content
Expand Down
1 change: 1 addition & 0 deletions htmlSanityCheck-gradle-plugin/src/test/resources

0 comments on commit b99d77f

Please sign in to comment.