Search in sources :

Example 11 with NewLiferayComponentOp

use of com.liferay.ide.project.core.modules.NewLiferayComponentOp in project liferay-ide by liferay.

the class NewLiferayComponentOpTests method testNewLiferayComponentDefaultValueServiceUnderscores.

@Test
public void testNewLiferayComponentDefaultValueServiceUnderscores() throws Exception {
    NewLiferayComponentOp op = NewLiferayComponentOp.TYPE.instantiate();
    op.setProjectName("my_test_project");
    op.setComponentClassTemplateName("PortletActionCommand");
    assertEquals("MyTestProjectPortletActionCommand", op.getComponentClassName().content(true));
}
Also used : NewLiferayComponentOp(com.liferay.ide.project.core.modules.NewLiferayComponentOp) Test(org.junit.Test)

Example 12 with NewLiferayComponentOp

use of com.liferay.ide.project.core.modules.NewLiferayComponentOp in project liferay-ide by liferay.

the class NewLiferayComponentOpTests method testNewLiferayComponentDefaultValueServiceIsListeningToComponentClassTemplateName.

@Test
public void testNewLiferayComponentDefaultValueServiceIsListeningToComponentClassTemplateName() throws Exception {
    NewLiferayComponentOp op = NewLiferayComponentOp.TYPE.instantiate();
    op.setProjectName("my.test.project");
    op.setComponentClassTemplateName("PortletActionCommand");
    assertEquals("MyTestProjectPortletActionCommand", op.getComponentClassName().content(true));
    op.setComponentClassTemplateName("FriendlyUrlMapper");
    assertEquals("MyTestProjectFriendlyUrlMapper", op.getComponentClassName().content(true));
}
Also used : NewLiferayComponentOp(com.liferay.ide.project.core.modules.NewLiferayComponentOp) Test(org.junit.Test)

Aggregations

NewLiferayComponentOp (com.liferay.ide.project.core.modules.NewLiferayComponentOp)12 Test (org.junit.Test)10 IFile (org.eclipse.core.resources.IFile)6 IProject (org.eclipse.core.resources.IProject)6 NewLiferayModuleProjectOp (com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp)5 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)5 Status (org.eclipse.sapphire.modeling.Status)5 PropertyKey (com.liferay.ide.project.core.modules.PropertyKey)1 Dependency (org.apache.maven.model.Dependency)1 Model (org.apache.maven.model.Model)1 IJavaProject (org.eclipse.jdt.core.IJavaProject)1 IType (org.eclipse.jdt.core.IType)1 IMaven (org.eclipse.m2e.core.embedder.IMaven)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1