Added basic test, using test inspector

This commit is contained in:
Xavi Aracil 2022-11-24 12:01:53 +01:00
parent 6f7b1f710a
commit ca8050d790

View File

@ -3,21 +3,28 @@ package org.oneedtech.inspect.vc;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
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.Test;
import org.oneedtech.inspect.core.Inspector.Behavior;
import org.oneedtech.inspect.core.report.Report;
import org.oneedtech.inspect.test.PrintHelper;
import org.oneedtech.inspect.vc.util.TestOB20Inspector.TestBuilder;
public class OB20Tests {
private static OB20Inspector validator;
private static boolean verbose = true;
@BeforeAll
static void setup() {
validator = new OB20Inspector.Builder()
static void setup() throws URISyntaxException {
validator = new TestBuilder()
.add(new URI("https://www.example.org/"), "ob20/assets")
.set(Behavior.TEST_INCLUDE_SUCCESS, true)
.set(Behavior.TEST_INCLUDE_WARNINGS, true)
.set(Behavior.VALIDATOR_FAIL_FAST, true)
.set(OB20Inspector.Behavior.ALLOW_LOCAL_REDIRECTION, true)
.build();
}
@ -29,5 +36,4 @@ public class OB20Tests {
assertValid(report);
});
}
}