Package org.netbeans.gradle.model.util

Examples of org.netbeans.gradle.model.util.ProjectConnectionTask


    private void testBasicInfoForProjectWithTasks(
            final String relativeProjectName,
            final String[] expectedTasks,
            final String[] unexpectedTasks) {

        runTestForSubProject(relativeProjectName, new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                GradleMultiProjectDef projectDef = fetchProjectDef(connection);
                testBasicInfoForProject(relativeProjectName, projectDef);

                GradleProjectTree mainProject = projectDef.getMainProject();
View Full Code Here


    private void testJavaSourcesModelForJavaProject(
            String relativeProjectName,
            final JavaSourcesModel expected,
            final String... projectDependencies) {

        runTestForSubProject(relativeProjectName, new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaSourcesModel sourcesModel
                        = fetchSingleProjectInfo(connection, JavaSourcesModelBuilder.COMPLETE);
                assertNotNull("Must have a JavaSourcesModel.", sourcesModel);
                SourceSetVerification.verifySourcesModelWithoutDependencies(expected, sourcesModel);
View Full Code Here

        testJavaSourcesModelForJavaProject("libs:lib3:lib2", sourcesOfLib3Lib2());
    }

    @Test
    public void testJavaSourcesModelForRoot() throws IOException {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaSourcesModel sourcesModel
                        = fetchSingleProjectInfo(connection, JavaSourcesModelBuilder.ONLY_COMPILE);
                assertNull("Root must not have a JavaSourcesModel.", sourcesModel);
            }
View Full Code Here

            }
        });
    }

    private void testJavaCompatibilityModel(String relativeProjectName) throws IOException {
        runTestForSubProject(relativeProjectName, new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaCompatibilityModel compatibilityModel
                        = fetchSingleProjectInfo(connection, JavaCompatibilityModelBuilder.INSTANCE);
                assertNotNull("Must have a JavaCompatibilityModel.", compatibilityModel);
View Full Code Here

        }
    }

    @Test
    public void testJavaCompatibilityModelForRoot() throws IOException {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaCompatibilityModel compatibilityModel
                        = fetchSingleProjectInfo(connection, JavaCompatibilityModelBuilder.INSTANCE);
                assertNull("Root must not have a JavaCompatibilityModel.", compatibilityModel);
            }
View Full Code Here

        String[] projectPathParts = relativeProjectPath.split(Pattern.quote(":"));
        String name = projectPathParts[projectPathParts.length - 1];
        File projectDir = getProjectDir(projectPathParts);
        final File expectedJarPath = getSubPath(projectDir, "build", "libs", name + ".jar");

        runTestForSubProject(relativeProjectPath, new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JarOutputsModel jarOutputs
                        = fetchSingleProjectInfo(connection, JarOutputsModelBuilder.INSTANCE);
                assertNotNull("Must have a JarOutputsModel.", jarOutputs);
View Full Code Here

        String[] projectPathParts = relativeProjectPath.split(Pattern.quote(":"));
        File projectDir = getProjectDir(projectPathParts);
        final File expectedXmlPathTest = getSubPath(projectDir, "build", "test-results");
        final File expectedXmlPathMyTest = getSubPath(projectDir, "build", "my-test-custom-results");

        runTestForSubProject(relativeProjectPath, new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaTestModel testModel
                        = fetchSingleProjectInfo(connection, JavaTestModelBuilder.INSTANCE);
                assertNotNull("Must have a JavaTestModel.", testModel);
View Full Code Here

        }
    }

    @Test
    public void testJavaTestModelForRoot() throws IOException {
         runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaTestModel testModel
                        = fetchSingleProjectInfo(connection, JavaTestModelBuilder.INSTANCE);
                assertNull("Root project must not have a JavaTestModel.", testModel);
            }
View Full Code Here

        });
    }

    @Test
    public void testJarOutputsModelForRoot() throws IOException {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JarOutputsModel jarOutputs
                        = fetchSingleProjectInfo(connection, JarOutputsModelBuilder.INSTANCE);
                assertNull("Root project must not have a JarOutputsModel.", jarOutputs);
            }
View Full Code Here

    }

    @Test
    public void testWarFoldersModel() throws IOException {
        for (String project: allProjects()) {
            runTestForSubProject(project, new ProjectConnectionTask() {
                public void doTask(ProjectConnection connection) throws Exception {
                    WarFoldersModel warFolders
                            = fetchSingleProjectInfo(connection, WarFoldersModelBuilder.INSTANCE);
                    assertNull("Must not have a WarFoldersModel.", warFolders);
                }
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.model.util.ProjectConnectionTask

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.