Examples of resolvePackage()


Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProjectStructureValid/pom.xml" );
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test a kModule.xml file resolves to a null package
        final Package result = projectService.resolvePackage( testPath );
        assertNull( result );
    }

    @Test
    public void testResolvePackageWithKModuleFile() throws Exception {
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProjectStructureValid/src/main/resources/META-INF/kmodule.xml" );
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test a kModule.xml file resolves to a null package
        final Package result = projectService.resolvePackage( testPath );
        assertNull( result );
    }

    @Test
    public void testIsPOMFileWithPOMFile() throws Exception {
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/" );
        final org.uberfire.java.nio.file.Path testNioPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( testNioPath );

        //Test a non-Project Path resolves to null
        final Package result = projectService.resolvePackage( testPath );
        assertNull( result );
    }

    @Test
    public void testResolveTestPackageWithRootPath() throws Exception {
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL rootUrl = this.getClass().getResource( "/ProjectBackendTestProject1" );
        final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
        final Path rootPath = paths.convert( nioRootPath );

        //Test a root resolves to null
        final Package result = projectService.resolvePackage( rootPath );
        assertNull( result );
    }

    @Test
    public void testResolveTestPackageWithSrcPath() throws Exception {
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL rootUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src" );
        final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
        final Path rootPath = paths.convert( nioRootPath );

        //Test a root/src resolves to null
        final Package result = projectService.resolvePackage( rootPath );
        assertNull( result );
    }

    @Test
    public void testResolveTestPackageWithMainPath() throws Exception {
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL rootUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/test" );
        final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
        final Path rootPath = paths.convert( nioRootPath );

        //Test a root/src/test resolves to null
        final Package result = projectService.resolvePackage( rootPath );
        assertNull( result );
    }

    @Test
    public void testResolveTestPackageDefaultJava() throws Exception {
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/test/java" );
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test /src/test/java resolves as the default package
        final Package result = projectService.resolvePackage( testPath );
        assertEquals( rootPath.toURI(),
                      result.getPackageTestSrcPath().toURI() );
    }

    @Test
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/test/resources" );
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test /src/test/resources resolves as the default package
        final Package result = projectService.resolvePackage( testPath );
        assertEquals( rootPath.toURI(),
                      result.getPackageTestResourcesPath().toURI() );
    }

    @Test
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/test/java/org/kie/test/project/backend/BeanTest.java" );
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test a Java file resolves to the containing package
        final Package result = projectService.resolvePackage( testPath );
        assertEquals( rootPath.toURI(),
                      result.getPackageTestSrcPath().toURI() );
    }

    @Test
View Full Code Here

Examples of org.guvnor.common.services.project.service.ProjectService.resolvePackage()

        final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/test/resources/org/kie/test/project/backend/test.scenario" );
        final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
        final Path testPath = paths.convert( nioTestPath );

        //Test a Resources file resolves to the containing package
        final Package result = projectService.resolvePackage( testPath );
        assertEquals( rootPath.toURI(),
                      result.getPackageTestResourcesPath().toURI() );
    }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.