Package com.buschmais.jqassistant.core.scanner.api

Examples of com.buschmais.jqassistant.core.scanner.api.Scanner


        MavenProjectDescriptor parentProjectDescriptor = mock(MavenProjectDescriptor.class);
        when(store.find(MavenProjectDescriptor.class, "group:parent-artifact:1.0.0")).thenReturn(null, parentProjectDescriptor);
        when(store.create(MavenProjectDescriptor.class, "group:parent-artifact:1.0.0")).thenReturn(parentProjectDescriptor);

        scannerPlugin.initialize(store, properties);
        Scanner scanner = mock(Scanner.class);
        List mainFiles = new ArrayList<>();
        mainFiles.add(mock(FileDescriptor.class));
        List testFiles = new ArrayList<>();
        testFiles.add(mock(FileDescriptor.class));

        when(scanner.scan(Mockito.any(ClassesDirectory.class), Mockito.any(String.class), Mockito.eq(CLASSPATH))).thenReturn(mainFiles, testFiles);

        scannerPlugin.scan(project, null, null, scanner);

        verify(scanner).scan(Mockito.any(ClassesDirectory.class), Mockito.eq("target/classes"), Mockito.eq(CLASSPATH));
        verify(scanner).scan(Mockito.any(ClassesDirectory.class), Mockito.eq("target/test-classes"), Mockito.eq(CLASSPATH));
View Full Code Here


            getLog().info("Directory '" + directory.getAbsolutePath() + "' does not exist, skipping scan.");
        } else {
            store.beginTransaction();
            try {
                final ArtifactDirectoryDescriptor artifactDescriptor = getOrCreateArtifactDescriptor(store);
                final Scanner scanner = new ScannerImpl(scannerPlugins);
                try {
                    consume(scanner.scan(new ClassesDirectory(directory, artifactDescriptor), CLASSPATH));
                } catch (IOException e) {
                    throw new RuntimeException("Cannot scan directory '" + directory.getAbsolutePath() + "'", e);
                }
            } finally {
                store.commitTransaction();
View Full Code Here

            try {
                scannerPlugins = scannerPluginRepository.getScannerPlugins();
            } catch (PluginRepositoryException e) {
                throw new MojoExecutionException("Cannot determine scanner plugins.", e);
            }
            Scanner scanner = new ScannerImpl(scannerPlugins);
            try {
                consume(scanner.scan(project, project.getFile().getAbsolutePath(), MavenScope.PROJECT));
            } catch (IOException e) {
                throw new MojoExecutionException("Cannot scan project '" + project.getBasedir() + "'", e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.buschmais.jqassistant.core.scanner.api.Scanner

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.