blob: fbcaa78a3196cfb1d2a2976936a2a342ae06e991 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2012 EclipseSource 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:
* EclipseSource - initial API and implementation
******************************************************************************/
package org.eclipse.swt.events;
import static org.mockito.Mockito.mock;
import junit.framework.TestCase;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Widget;
public class PaintEvent_Test extends TestCase {
public void testUntypedEventConstructor() throws Exception {
Event event = new Event();
event.display = mock( Display.class );
event.widget = mock( Widget.class );
event.time = 321;
event.gc = mock( GC.class );
event.x = 3;
event.y = 4;
event.width = 5;
event.height = 6;
event.count = 99;
PaintEvent paintEvent = new PaintEvent( event );
EventTestHelper.assertFieldsEqual( paintEvent, event );
}
}