From ca8050d79045ebf0691dc832c05e2d2a918deeb8 Mon Sep 17 00:00:00 2001 From: Xavi Aracil Date: Thu, 24 Nov 2022 12:01:53 +0100 Subject: [PATCH] Added basic test, using test inspector --- .../org/oneedtech/inspect/vc/OB20Tests.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB20Tests.java b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB20Tests.java index 34505fd..8e1df53 100644 --- a/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB20Tests.java +++ b/inspector-vc/src/test/java/org/oneedtech/inspect/vc/OB20Tests.java @@ -3,22 +3,29 @@ 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() - .set(Behavior.TEST_INCLUDE_SUCCESS, true) - .set(Behavior.VALIDATOR_FAIL_FAST, true) - .build(); + 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(); } @Test @@ -29,5 +36,4 @@ public class OB20Tests { assertValid(report); }); } - }