use of com.liferay.ide.server.tomcat.core.ILiferayTomcatServer in project liferay-ide by liferay.
the class ServerCustomSettingTests method testDefaultValueOfUseDefaultPortalSetting.
@Test
public void testDefaultValueOfUseDefaultPortalSetting() throws Exception {
if (shouldSkipBundleTests())
return;
final NullProgressMonitor npm = new NullProgressMonitor();
if (runtime == null) {
setupRuntime();
}
assertNotNull(runtime);
final IServerWorkingCopy serverWC = createServerForRuntime("testdefault", runtime);
IServer newServer = serverWC.save(true, npm);
IServer findServer = ServerCore.findServer(newServer.getId());
assertNotNull(findServer);
ILiferayTomcatServer portalServer = (ILiferayTomcatServer) findServer.loadAdapter(ILiferayTomcatServer.class, null);
final boolean useDefaultPortalServerSettings = ((LiferayTomcatServer) portalServer).getUseDefaultPortalServerSettings();
assertEquals(false, useDefaultPortalServerSettings);
}
use of com.liferay.ide.server.tomcat.core.ILiferayTomcatServer in project liferay-ide by liferay.
the class ServerCustomSettingTests method testSettingValueOfUseDefaultPortalSetting.
@Test
public void testSettingValueOfUseDefaultPortalSetting() throws Exception {
if (shouldSkipBundleTests())
return;
final NullProgressMonitor npm = new NullProgressMonitor();
if (runtime == null) {
setupRuntime();
}
assertNotNull(runtime);
final IServerWorkingCopy serverWC = createServerForRuntime("testdefault2", runtime);
serverWC.setAttribute(ILiferayTomcatServer.PROPERTY_USE_DEFAULT_PORTAL_SERVER_SETTINGS, true);
IServer newServer = serverWC.save(true, npm);
IServer findServer = ServerCore.findServer(newServer.getId());
ILiferayTomcatServer portalServer = (ILiferayTomcatServer) findServer.loadAdapter(ILiferayTomcatServer.class, npm);
final boolean useDefaultPortalServerSettings = ((LiferayTomcatServer) portalServer).getUseDefaultPortalServerSettings();
assertEquals(true, useDefaultPortalServerSettings);
}
Aggregations