Search in sources :

Example 1 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testAlloyGradleJSFProject.

@Test
public void testAlloyGradleJSFProject() throws Exception {
    NewLiferayJSFModuleProjectOp op = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    op.setProjectProvider("gradle-jsf");
    op.setProjectName("Test14");
    op.setTemplateName("alloy");
    Status status = NewLiferayJSFModuleProjectOpMethods.execute(op, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(status.ok());
    waitForBuildAndValidation2();
    IProject project = CoreUtil.getProject("Test14");
    assertNotNull(project);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 2 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFModuleStandardAloneProject.

@Test
public void testNewLiferayJSFModuleStandardAloneProject() throws Exception {
    NewLiferayJSFModuleProjectOp mavenProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    mavenProjectop.setProjectProvider("gradle-jsf");
    mavenProjectop.setProjectName("Test4");
    mavenProjectop.setTemplateName("icefaces");
    Status mavenProjectStatus = NewLiferayJSFModuleProjectOpMethods.execute(mavenProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(mavenProjectStatus.ok());
    IProject mavenProject = CoreUtil.getProject("Test4");
    assertNotNull(mavenProject);
    NewLiferayJSFModuleProjectOp graldeProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    graldeProjectop.setProjectProvider("gradle-jsf");
    graldeProjectop.setProjectName("Test5");
    mavenProjectop.setTemplateName("alloy");
    Status gradleProjectStatus = NewLiferayJSFModuleProjectOpMethods.execute(graldeProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(gradleProjectStatus.ok());
    IProject gradleProject = CoreUtil.getProject("Test5");
    assertNotNull(gradleProject);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 3 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testMavenICEFacesNewLiferayJSFModuleProjectOp.

@Test
public void testMavenICEFacesNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Testq10");
    existedProjectop.setTemplateName("alloy");
    Status exStatus = NewLiferayJSFModuleProjectOpMethods.execute(existedProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(exStatus.ok());
    IProject existedProject = CoreUtil.getProject(existedProjectop.getProjectName().content());
    assertNotNull(existedProject);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 4 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFModuleProjectOpProjectName.

@Test
public void testNewLiferayJSFModuleProjectOpProjectName() throws Exception {
    NewLiferayJSFModuleProjectOp op = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    op.setProjectProvider("maven-jsf");
    op.setProjectName("Test1");
    Status projectNameOkValidationStatus1 = op.getProjectName().validation();
    assertEquals(projectNameOkValidationStatus1.message(), "ok");
    op.setProjectProvider("maven-jsf");
    op.setProjectName("#Test1");
    Status projectNameErrorValidationStatus = op.getProjectName().validation();
    assertEquals(projectNameErrorValidationStatus.message(), "The project name is invalid.");
    op.setProjectProvider("maven-jsf");
    op.setProjectName("Test1_Abc");
    Status projectNameOkValidationStatus2 = op.getProjectName().validation();
    assertEquals(projectNameOkValidationStatus2.message(), "ok");
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) Test(org.junit.Test)

Example 5 with NewLiferayJSFModuleProjectOp

use of com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp in project liferay-ide by liferay.

the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFWarWorkspaceMavenJsfProject.

@Test
public void testNewLiferayJSFWarWorkspaceMavenJsfProject() throws Exception {
    importWorkspaceProject("testWorkspace");
    IProject workspaceProject = CoreUtil.getProject("testWorkspace");
    assertNotNull(workspaceProject);
    NewLiferayJSFModuleProjectOp op = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    op.setProjectProvider("maven-jsf");
    op.setProjectName("Test13");
    op.setTemplateName("jsf");
    assertNotNull(workspaceProject.getLocation());
    op.setLocation(workspaceProject.getLocation().append("wars").toOSString());
    Status status = NewLiferayJSFModuleProjectOpMethods.execute(op, ProgressMonitorBridge.create(new NullProgressMonitor()));
    waitForBuildAndValidation2();
    assertTrue(status.ok());
    IProject project = CoreUtil.getProject("Test13");
    assertNotNull(project);
}
Also used : Status(org.eclipse.sapphire.modeling.Status) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) NewLiferayJSFModuleProjectOp(com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Aggregations

NewLiferayJSFModuleProjectOp (com.liferay.ide.project.core.jsf.NewLiferayJSFModuleProjectOp)15 IProject (org.eclipse.core.resources.IProject)14 Status (org.eclipse.sapphire.modeling.Status)14 Test (org.junit.Test)14 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)13 DefaultValueService (org.eclipse.sapphire.DefaultValueService)1