audittool/test-lib/src/test/java/io/bdrc/audit/audittests/IsInstanceTest.java
@Test
    @Ignore
    public void TestRunnable() throws URISyntaxException, MalformedURLException, NoSuchMethodException,
            InstantiationException, IllegalAccessException, InvocationTargetException
    {
        URL libUrl = (new URI(jarUrlStr)).toURL();
        final Hashtable<String, String> emptySequenceTestParams = new Hashtable<>();
        // endregion

        Hashtable<String, AuditTestConfig> libTests = getTestDictionary(libUrl, dictName);

        for (AuditTestConfig c : libTests.values()) {
            // debug System.out.println(MessageFormat.format("testing {0}",c.getKey()));
            IAuditTest thisTest =
                    (IAuditTest) (c.getTestClass().getDeclaredConstructor(Logger.class, String.class).newInstance(logger,
                            c.getKey()));
            thisTest.setParams("/ImNotHere", emptySequenceTestParams);
            thisTest.LaunchTest();
            TestResult tr = thisTest.getTestResult();
            Assert.assertNotNull(tr);

            Assert.assertEquals(String.format("Test %s unexpected rc", thisTest.getTestName()),
                    LibOutcome.ROOT_NOT_FOUND, tr.getErrors().get(0).getOutcome());
        }
    }
/**
     * Make sure every test Fails with root not found when given a bogus directory
     */
Make sure every test Fails with root not found when given a bogus directory
Make sure every test Fails with root not found when given a bogus directory
@Test
    @Ignore
    public void TestRunnable() throws URISyntaxException, MalformedURLException, NoSuchMethodException,
            InstantiationException, IllegalAccessException, InvocationTargetException
    {
        URL libUrl = (new URI(jarUrlStr)).toURL();
        final Hashtable<String, String> emptySequenceTestParams = new Hashtable<>();
        Hashtable<String, AuditTestConfig> libTests = getTestDictionary(libUrl, dictName);
        for (AuditTestConfig c : libTests.values()) {
            IAuditTest thisTest =
                    (IAuditTest) (c.getTestClass().getDeclaredConstructor(Logger.class, String.class).newInstance(logger,
                            c.getKey()));
            thisTest.setParams("/ImNotHere", emptySequenceTestParams);
            thisTest.LaunchTest();
            TestResult tr = thisTest.getTestResult();
            Assert.assertNotNull(tr);
            Assert.assertEquals(String.format("Test %s unexpected rc", thisTest.getTestName()),
                    LibOutcome.ROOT_NOT_FOUND, tr.getErrors().get(0).getOutcome());
        }
    }
@ Test @ Ignore public void TestRunnable ( ) throws URISyntaxException , MalformedURLException , NoSuchMethodException , InstantiationException , IllegalAccessException , InvocationTargetException { URL libUrl = ( new URI ( jarUrlStr ) ) . toURL ( ) ; final Hashtable < String , String > emptySequenceTestParams = new Hashtable < > ( ) ; Hashtable < String , AuditTestConfig > libTests = getTestDictionary ( libUrl , dictName ) ; for ( AuditTestConfig c : libTests . values ( ) ) { IAuditTest thisTest = ( IAuditTest ) ( c . getTestClass ( ) . getDeclaredConstructor ( Logger . class , String . class ) . newInstance ( logger , c . getKey ( ) ) ) ; thisTest . setParams ( "/ImNotHere" , emptySequenceTestParams ) ; thisTest . LaunchTest ( ) ; TestResult tr = thisTest . getTestResult ( ) ; Assert . assertNotNull ( tr ) ; Assert . assertEquals ( String . format ( "Test %s unexpected rc" , thisTest . getTestName ( ) ) , LibOutcome . ROOT_NOT_FOUND , tr . getErrors ( ) . get ( 0 ) . getOutcome ( ) ) ; } }
Make sure every test Fails with root not found when given a bogus directory
Make sure every test Fails with root not found when given a bogus directory
// endregion // debug System.out.println(MessageFormat.format("testing {0}",c.getKey()));