blob: 4d91c67461f3587e9d99536988da4a56bea1915f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2004 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.swt.tests.junit;
import junit.framework.TestCase;
import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
/**
* Automated Test Suite for class org.eclipse.swt.events.TypedEvent
*
* @see org.eclipse.swt.events.TypedEvent
*/
public class Test_org_eclipse_swt_events_TypedEvent extends TestCase {
@Override
protected void setUp() {
shell = new Shell();
}
@Override
protected void tearDown() {
shell.dispose();
}
public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
Event event = new Event();
event.widget = shell;
TypedEvent typedEvent = newTypedEvent(event);
assertNotNull(typedEvent);
}
public void test_toString() {
Event event = new Event();
event.widget = shell;
TypedEvent typedEvent = newTypedEvent(event);
assertNotNull(typedEvent.toString());
assertTrue(typedEvent.toString().length() > 0);
}
/* custom */
public Shell shell;
protected TypedEvent newTypedEvent(Event event) {
return new TypedEvent(event);
}
}