Skip to content

Commit

Permalink
These changes do not yet work!
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Oct 11, 2023
1 parent 82a2c7f commit c548edf
Show file tree
Hide file tree
Showing 76 changed files with 19 additions and 17 deletions.
10 changes: 8 additions & 2 deletions htmlSanityCheck-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ dependencies {

testImplementation(
'junit:junit:4.12',
'org.spockframework:spock-core:1.3-groovy-2.5'
'org.spockframework:spock-core:1.3-groovy-2.5',
'org.slf4j:slf4j-simple:2.0.7'
)

implementation 'org.codehaus.groovy:groovy-all:2.5.22'
// implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'
implementation "org.slf4j:slf4j-api:2.0.7"

// jsoup is our awesome html parser, see jsoup.org
implementation group: 'org.jsoup', name: 'jsoup', version: '1.16.1'
implementation 'org.codehaus.groovy:groovy-all:2.5.12'
}

Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Configuration {
* We need at least one html file as input, maybe several
* @param configuration instance
*
* srcDocs needs to be of type {@link org.gradle.api.file.FileCollection}
* srcDocs needs to be of type {@link FileCollection}
* to be Gradle-compliant
*/
Boolean isValid() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.aim42.htmlsanitycheck

import junit.framework.TestCase
import org.aim42.htmlsanitycheck.check.AllCheckers
import org.aim42.htmlsanitycheck.collect.SinglePageResults
import org.junit.Test
Expand Down Expand Up @@ -37,16 +38,16 @@ class AllChecksRunnerTest extends GroovyTestCase {
// title = "hsc"
int expected = AllCheckers.checkerClazzes.size()

assertEquals("expected $expected kinds of checks", expected, pageResults.singleCheckResults.size())
TestCase.assertEquals("expected $expected kinds of checks", expected, pageResults.singleCheckResults.size())

assertEquals("expected 0 items checked", 0, pageResults.nrOfItemsCheckedOnPage())
TestCase.assertEquals("expected 0 items checked", 0, pageResults.nrOfItemsCheckedOnPage())

assertEquals("expected 0 findings", 0, pageResults.nrOfFindingsOnPage())
TestCase.assertEquals("expected 0 findings", 0, pageResults.nrOfFindingsOnPage())

assertEquals("expected hsc title", "hsc", pageResults.pageTitle)
TestCase.assertEquals("expected hsc title", "hsc", pageResults.pageTitle)

String tmpFileName = tmpFile.name
assertEquals("expected $tmpFileName as fileName", tmpFileName, pageResults.pageFileName )
TestCase.assertEquals("expected $tmpFileName as fileName", tmpFileName, pageResults.pageFileName )
}


Expand All @@ -69,9 +70,9 @@ class AllChecksRunnerTest extends GroovyTestCase {
SinglePageResults pageResults = allChecksRunner.performChecksForOneFile( tmpFile )

int expected = AllCheckers.checkerClazzes.size()
assertEquals("expected $expected kinds of checks", expected, pageResults.singleCheckResults.size())
TestCase.assertEquals("expected $expected kinds of checks", expected, pageResults.singleCheckResults.size())

assertEquals("expected 2 findings", 2, pageResults.nrOfFindingsOnPage())
TestCase.assertEquals("expected 2 findings", 2, pageResults.nrOfFindingsOnPage())

}

Expand All @@ -86,7 +87,7 @@ class AllChecksRunnerTest extends GroovyTestCase {
allChecksRunner = new AllChecksRunner(myConfig)
SinglePageResults pageResults = allChecksRunner.performChecksForOneFile(tmpFile)

assertEquals(1, pageResults.singleCheckResults.size())
TestCase.assertEquals(1, pageResults.singleCheckResults.size())
}

}
Expand Down
7 changes: 1 addition & 6 deletions htmlSanityCheck-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,10 @@ dependencies {

implementation gradleApi()

implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1'

// since gradle 4.6, annotation processors shall be explicitly declared
// (instead of just having them in the compile-group)
annotationProcessor 'org.apache.logging.log4j:log4j-core:2.17.1'

// annotationProcessor 'org.apache.logging.log4j:log4j-core:2.17.1'

// jsoup is our awesome html parser, see jsoup.org
implementation group: 'org.jsoup', name: 'jsoup', version: '1.16.1'
implementation project(":htmlSanityCheck-core")


Expand Down

0 comments on commit c548edf

Please sign in to comment.