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);
}
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);
}
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);
}
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");
}
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);
}
Aggregations