blob: 6ec4c880d02836194310d38ad37eaab93e28b74f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.wst.server.core.tests.model;
import junit.framework.TestCase;
import org.eclipse.wst.server.core.model.RuntimeDelegate;
import org.eclipse.wst.server.core.tests.impl.TestRuntimeDelegate;
public class RuntimeDelegateTestCase extends TestCase {
protected static RuntimeDelegate delegate;
protected RuntimeDelegate getRuntimeDelegate() {
if (delegate == null) {
delegate = new TestRuntimeDelegate();
}
return delegate;
}
public void testGetRuntime() throws Exception {
getRuntimeDelegate().getRuntime();
}
public void testGetRuntimeWorkingCopy() throws Exception {
getRuntimeDelegate().getRuntimeWorkingCopy();
}
public void testValidate() {
try {
getRuntimeDelegate().validate();
} catch (Exception e) {
// ignore
}
}
public void testDispose() throws Exception {
getRuntimeDelegate().dispose();
}
public void testSetDefaults() throws Exception {
getRuntimeDelegate().setDefaults(null);
}
public void testProtected() throws Exception {
((TestRuntimeDelegate)getRuntimeDelegate()).testProtected();
}
}