Package org.netbeans.gradle.model.util

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


        }
    }

    @Test
    public void testCustomQuery() throws IOException {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                String prefix = "testCustomQuery-";
                String result = fetchSingleBuildInfo(connection, TestBuilders.testBuildInfoBuilder(prefix));

                assertEquals(prefix + ROOT_NAME, result);
View Full Code Here


        });
    }

    @Test
    public void testFailingProjectQuery() throws IOException {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                String message = "testFailingProjectQuery-message";
                ProjectInfoBuilder<?> builder = TestBuilders.failingProjectInfoBuilder(message);
                BuilderResult result = fetchSingleProjectInfoWithError(connection, builder);
                assertNotNull("Required result for FailingProjectInfoBuilder.", result);
View Full Code Here

        });
    }

    @Test
    public void testFailingBuildQuery() throws IOException {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                String message = "testFailingBuildQuery-message";
                BuildInfoBuilder<?> builder = TestBuilders.failingBuildInfoBuilder(message);

                BuilderResult result = fetchSingleBuildInfoWithError(connection, builder);
View Full Code Here

                InfoQueries.toCustomQuery(TestBuilders.testBuildInfoBuilder(prefix))));

        toolingModels.add(IdeaProject.class);

        final GenericModelFetcher fetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        runTestForSubProject("apps:app1", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                FetchedModels models = verifyNoError(fetcher.getModels(connection, TestUtils.defaultInit()));

                String buildInfo = (String)getSingleBuildResult(
                        models.getBuildInfoResults().get(0));
View Full Code Here

                InfoQueries.toCustomQuery(TestBuilders.testBuildInfoBuilder(prefix))));

        toolingModels.add(IdeaProject.class);

        final GenericModelFetcher fetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        runTestForSubProject("apps:app1", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                FetchedModels models = verifyNoError(fetcher.getModels(connection, TestUtils.defaultInit()));

                String buildInfo = (String)getSingleBuildResult(
                        models.getBuildInfoResults().get(0));
View Full Code Here

                InfoQueries.toQueryWithKnownClassPath(ConstBuilders.constBuildInfoBuilder(new SerializableObject()))));

        toolingModels.add(IdeaProject.class);

        final GenericModelFetcher fetcher = new GenericModelFetcher(buildInfos, projectInfos, toolingModels);
        runTestForSubProject("apps:app1", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                FetchedModels models = verifyNoError(fetcher.getModels(connection, TestUtils.defaultInit()));

                BuilderResult buildInfo1 = CollectionUtils
                        .getSingleElement(models.getBuildInfoResults().get(1));
View Full Code Here

    }

    private void testBuiltInModels(String relativeProjectPath) throws IOException {
        final String projectPath = ":" + relativeProjectPath;

        runTestForSubProject(relativeProjectPath, new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                Class<?>[] models = new Class<?>[]{
                    EclipseProject.class,
                    IdeaProject.class,
                    GradleProject.class
View Full Code Here

        TestUtils.runTestForSubProject(testedProjectDir, projectName, task);
    }

    @Test
    public void testIssue101() {
        runTestForSubProject("", new ProjectConnectionTask() {
            public void doTask(ProjectConnection connection) throws Exception {
                JavaSourcesModel sourcesModel
                        = fetchSingleProjectInfo(connection, JavaSourcesModelBuilder.COMPLETE);
                assertNotNull(sourcesModel);
                JavaModelTests.checkNoDependencyResolultionError(sourcesModel);
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.