| /******************************************************************************* |
| * Copyright (c) 2018 SAP SE and others. |
| * |
| * This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * SAP SE - initial version |
| ******************************************************************************/ |
| package org.eclipse.jface.widgets; |
| |
| import org.eclipse.swt.graphics.Image; |
| import org.eclipse.swt.graphics.Rectangle; |
| import org.eclipse.swt.widgets.Shell; |
| import org.junit.After; |
| import org.junit.AfterClass; |
| import org.junit.Before; |
| import org.junit.BeforeClass; |
| |
| public class AbstractFactoryTest { |
| protected static Shell shell; |
| protected static Image image; |
| |
| @BeforeClass |
| public static void classSetup() { |
| image = new Image(null, new Rectangle(1, 1, 1, 1)); |
| } |
| |
| @Before |
| public void setup() { |
| shell = new Shell(); |
| } |
| |
| @After |
| public void tearDown() { |
| shell.dispose(); |
| } |
| |
| @AfterClass |
| public static void classTearDown() { |
| image.dispose(); |
| shell.dispose(); |
| } |
| |
| } |