Examples of resolveProject()


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

    public void testBasic() throws Exception {

        final ProjectService projectService = mock( ProjectService.class );
        final Project project = mock( Project.class );
        final Path path = mock( Path.class );
        when( projectService.resolveProject( any( Path.class ) ) ).thenReturn( project );

        final RuleNamesServiceImpl ruleNamesService = new RuleNamesServiceImpl( projectService );

        final HashMap<String, Collection<String>> ruleNames = new HashMap<String, Collection<String>>();
View Full Code Here

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

        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 Project result = projectService.resolveProject( testPath );
        assertNull( result );
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}
View Full Code Here

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

    if (ioService != null) {
      Path projectPath  = ioService.get(URI.create(projectUri));
      logger.debug("Project path is " + projectPath);
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));

            BuildResults results = builder.buildAndDeploy(project);

            // dump to debug if enabled
            if (logger.isDebugEnabled()) {
View Full Code Here

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

      if (projectPath == null) {
        throw new IllegalArgumentException("Unable to find project location " + projectUri);
      }
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));
     
      if (project == null) {
        throw new IllegalArgumentException("Unable to find project " + projectUri);
      }
     
View Full Code Here

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

    if (ioService != null) {
      Path projectPath  = ioService.get(URI.create(projectUri));
      logger.debug("Project path is " + projectPath);
     
      ProjectService projectService = CDIUtils.createBean(ProjectService.class, beanManager);
      Project project = projectService.resolveProject(Paths.convert(projectPath));
      if (project == null) {
        throw new IllegalArgumentException("Unable to find project " + projectUri);
      }
      BuildResults results = buildService.build(project);     
      // dump to debug if enabled
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.