Added basic test, using test inspector
This commit is contained in:
parent
6f7b1f710a
commit
ca8050d790
@ -3,22 +3,29 @@ package org.oneedtech.inspect.vc;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||||
import static org.oneedtech.inspect.test.Assertions.assertValid;
|
import static org.oneedtech.inspect.test.Assertions.assertValid;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.oneedtech.inspect.core.Inspector.Behavior;
|
import org.oneedtech.inspect.core.Inspector.Behavior;
|
||||||
import org.oneedtech.inspect.core.report.Report;
|
import org.oneedtech.inspect.core.report.Report;
|
||||||
import org.oneedtech.inspect.test.PrintHelper;
|
import org.oneedtech.inspect.test.PrintHelper;
|
||||||
|
import org.oneedtech.inspect.vc.util.TestOB20Inspector.TestBuilder;
|
||||||
|
|
||||||
public class OB20Tests {
|
public class OB20Tests {
|
||||||
private static OB20Inspector validator;
|
private static OB20Inspector validator;
|
||||||
private static boolean verbose = true;
|
private static boolean verbose = true;
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
static void setup() {
|
static void setup() throws URISyntaxException {
|
||||||
validator = new OB20Inspector.Builder()
|
validator = new TestBuilder()
|
||||||
.set(Behavior.TEST_INCLUDE_SUCCESS, true)
|
.add(new URI("https://www.example.org/"), "ob20/assets")
|
||||||
.set(Behavior.VALIDATOR_FAIL_FAST, true)
|
.set(Behavior.TEST_INCLUDE_SUCCESS, true)
|
||||||
.build();
|
.set(Behavior.TEST_INCLUDE_WARNINGS, true)
|
||||||
|
.set(Behavior.VALIDATOR_FAIL_FAST, true)
|
||||||
|
.set(OB20Inspector.Behavior.ALLOW_LOCAL_REDIRECTION, true)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -29,5 +36,4 @@ public class OB20Tests {
|
|||||||
assertValid(report);
|
assertValid(report);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user