Package com.denimgroup.threadfix.importer.parser

Examples of com.denimgroup.threadfix.importer.parser.ThreadFixBridge


        minusOneYear.set(Calendar.YEAR, minusOneYear.get(Calendar.YEAR) - 1);
    }

    @Test
    public void testFalseNegatives() {
        ThreadFixBridge threadFixBridge = getThreadFixBridge();

        builder = new StringBuilder();

        for (Map.Entry<ScannerType, Collection<String>> entry : FolderMappings.getEntries()) {
            Calendar mostRecent = null;
            for (String file : entry.getValue()) {
                try {
                    ScanCheckResultBean returnBean =
                            threadFixBridge.testScan(entry.getKey(), new File(file));

                    assertTrue("Got null return bean while testing " + file, returnBean != null);
                    assertTrue("Response status wasn't success for file " + file + ", it was " +
                            returnBean.getScanCheckResult(),
                            returnBean.getScanCheckResult() == ScanImportStatus.SUCCESSFUL_SCAN);
View Full Code Here


        System.out.println(builder);
    }

    @Test
    public void testFalsePositives() {
        ThreadFixBridge threadFixBridge = getThreadFixBridge();

        builder = new StringBuilder();

        for (Map.Entry<ScannerType, Collection<String>> outerEntry : FolderMappings.getEntries()) {
            for (Map.Entry<ScannerType, Collection<String>> innerEntry : FolderMappings.getEntries()) {

                if (innerEntry.getKey() != outerEntry.getKey()) {

                    for (String file : innerEntry.getValue()) {
                        try {
                            ScanCheckResultBean returnBean =
                                    threadFixBridge.testScan(outerEntry.getKey(), new File(file));

                            assertTrue("Got null return bean while testing " + file, returnBean != null);
                            assertTrue("Response status was success for scanner " + outerEntry.getKey() +
                                            " and file " + file + ".",
                                    returnBean.getScanCheckResult() != ScanImportStatus.SUCCESSFUL_SCAN);
View Full Code Here

            }
        }
    }

    private ThreadFixBridge getThreadFixBridge() {
        ThreadFixBridge threadFixBridge = SpringConfiguration.getContext().getBean(ThreadFixBridge.class);
        assertNotNull("Fix your autowiring, ThreadFixBridge instance was null.", threadFixBridge);
        return threadFixBridge;
    }
View Full Code Here

     */
    @Test
    @Transactional
    public void runSkipFishLotsOfTimesToMakeSureItWorks() {

        ThreadFixBridge threadFixBridge = getThreadFixBridge();

        for (int i = 0; i < 20; i++) {
            System.out.print('.');
            for (String file : FolderMappings.getValue(ScannerType.SKIPFISH)) {
                System.out.print('-');
                ScanCheckResultBean returnBean =
                        threadFixBridge.testScan(ScannerType.SKIPFISH, new File(file));

                assertTrue("Got null return bean while testing " + file, returnBean != null);
                assertTrue("Response status wasn't success for file " + file + ", it was " +
                        returnBean.getScanCheckResult(),
                        returnBean.getScanCheckResult() == ScanImportStatus.SUCCESSFUL_SCAN);

                threadFixBridge.getScan(ScannerType.SKIPFISH, new File(file));
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.importer.parser.ThreadFixBridge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.