Search in sources :

Example 11 with NewLiferayJSFModuleProjectOp

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

the class NewLiferayJSFModuleProjectOpTests method testMavenRichFacesNewLiferayJSFModuleProjectOp.

@Test
public void testMavenRichFacesNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test7");
    existedProjectop.setTemplateName("richfaces");
    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 12 with NewLiferayJSFModuleProjectOp

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

the class NewLiferayJSFModuleProjectOpTests method testMavenJSFStandardNewLiferayJSFModuleProjectOp.

@Test
public void testMavenJSFStandardNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test11");
    existedProjectop.setTemplateName("jsf");
    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 13 with NewLiferayJSFModuleProjectOp

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

the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFModuleProjectOpProjectExisted.

@Test
public void testNewLiferayJSFModuleProjectOpProjectExisted() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("gradle-jsf");
    existedProjectop.setProjectName("Test2");
    existedProjectop.setTemplateName("richfaces");
    Status exStatus = NewLiferayJSFModuleProjectOpMethods.execute(existedProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(exStatus.ok());
    IProject existedProject = CoreUtil.getProject(existedProjectop.getProjectName().content());
    assertNotNull(existedProject);
    NewLiferayJSFModuleProjectOp newProjectNameop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    newProjectNameop.setProjectProvider("gradle-jsf");
    newProjectNameop.setProjectName("Test2");
    Status projectNameExistedValidationStatus = newProjectNameop.getProjectName().validation();
    assertEquals(false, projectNameExistedValidationStatus.ok());
}
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 14 with NewLiferayJSFModuleProjectOp

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

the class NewLiferayJSFModuleProjectOpTests method testMavenLiferayFacesNewLiferayJSFModuleProjectOp.

@Test
public void testMavenLiferayFacesNewLiferayJSFModuleProjectOp() throws Exception {
    NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    existedProjectop.setProjectProvider("maven-jsf");
    existedProjectop.setProjectName("Test9");
    existedProjectop.setTemplateName("icefaces");
    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 15 with NewLiferayJSFModuleProjectOp

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

the class NewLiferayJSFModuleProjectOpTests method testPrimefacesGradleJSFProject.

@Test
public void testPrimefacesGradleJSFProject() throws Exception {
    NewLiferayJSFModuleProjectOp op = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
    op.setProjectProvider("gradle-jsf");
    op.setProjectName("Test16");
    op.setTemplateName("primefaces");
    Status status = NewLiferayJSFModuleProjectOpMethods.execute(op, ProgressMonitorBridge.create(new NullProgressMonitor()));
    assertTrue(status.ok());
    waitForBuildAndValidation2();
    IProject project = CoreUtil.getProject("Test16");
    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