First empty inspector for OB20

This commit is contained in:
Xavi Aracil
2022-11-22 18:04:42 +01:00
parent e56739370f
commit 0e077c7256
2 changed files with 126 additions and 0 deletions
@@ -0,0 +1,33 @@
package org.oneedtech.inspect.vc;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.oneedtech.inspect.test.Assertions.assertValid;
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;
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();
}
@Test
void testSimpleJsonValid() {
assertDoesNotThrow(()->{
Report report = validator.run(Samples.OB20.JSON.SIMPLE_ASSERTION_JSON.asFileResource());
if(verbose) PrintHelper.print(report, true);
assertValid(report);
});
}
}