use of org.eclipse.sapphire.DefaultValueService in project liferay-ide by liferay.
the class NewLiferayPluginProjectOpBase method testDisplayNameDefaultValue.
@Test
public void testDisplayNameDefaultValue() throws Exception {
if (shouldSkipBundleTests())
return;
final NewLiferayPluginProjectOp op = newProjectOp("display-name-default-value");
final DefaultValueService dvs = op.getDisplayName().service(DefaultValueService.class);
final String exceptedDisplayName = "Test Display Name Default Value";
op.setProjectName("test display name default value");
assertEquals(exceptedDisplayName, op.getDisplayName().content());
assertEquals(exceptedDisplayName, dvs.value());
op.setProjectName("Test-Display-Name-Default-Value");
assertEquals(exceptedDisplayName, op.getDisplayName().content());
assertEquals(exceptedDisplayName, dvs.value());
op.setProjectName("Test_Display_Name_Default_Value");
assertEquals(exceptedDisplayName, op.getDisplayName().content());
assertEquals(exceptedDisplayName, dvs.value());
op.setProjectName("test-Display_name Default-value");
assertEquals(exceptedDisplayName, op.getDisplayName().content());
assertEquals(exceptedDisplayName, dvs.value());
final String projectName = "test-display_name default value";
final String[] suffixs = { "-portlet", "-hook", "-theme", "-layouttpl", "-ext" };
for (String suffix : suffixs) {
op.setProjectName(projectName + suffix);
assertEquals(exceptedDisplayName, op.getDisplayName().content());
assertEquals(exceptedDisplayName, dvs.value());
}
}
use of org.eclipse.sapphire.DefaultValueService in project liferay-ide by liferay.
the class NewLiferayJSFModuleProjectOpTests method testNewLiferayJSFModuleProjectOpDefaultBuildType.
@Test
public void testNewLiferayJSFModuleProjectOpDefaultBuildType() throws Exception {
NewLiferayJSFModuleProjectOp existedProjectop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
existedProjectop.setProjectName("Test3");
existedProjectop.setProjectProvider("gradle-jsf");
existedProjectop.setTemplateName("primefaces");
Status exStatus = NewLiferayJSFModuleProjectOpMethods.execute(existedProjectop, ProgressMonitorBridge.create(new NullProgressMonitor()));
assertTrue(exStatus.ok());
IProject existedProject = CoreUtil.getProject(existedProjectop.getProjectName().content());
assertNotNull(existedProject);
NewLiferayJSFModuleProjectOp newBuildTypeop = NewLiferayJSFModuleProjectOp.TYPE.instantiate();
DefaultValueService buildTypeDefaultService = newBuildTypeop.getProjectProvider().service(DefaultValueService.class);
assertEquals(buildTypeDefaultService.value(), "gradle-jsf");
}
Aggregations