blob: 638eb7cf7c3204a1459f150cc9d966149f391553 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.tests.api;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
/**
* This is a test for IViewPart. Since IViewPart is an
* interface this test verifies the IViewPart lifecycle rather
* than the implementation.
*/
public class IViewPartTest extends IWorkbenchPartTest {
/**
* Constructor for IEditorPartTest
*/
public IViewPartTest(String testName) {
super(testName);
}
/**
* @see IWorkbenchPartTest#openPart(IWorkbenchPage)
*/
protected MockWorkbenchPart openPart(IWorkbenchPage page) throws Throwable {
return (MockWorkbenchPart)page.showView(MockViewPart.ID);
}
/**
* @see IWorkbenchPartTest#closePart(IWorkbenchPage, MockWorkbenchPart)
*/
protected void closePart(IWorkbenchPage page, MockWorkbenchPart part)
throws Throwable
{
page.hideView((IViewPart)part);
}
}