Search in sources :

Example 6 with GCInterface

use of org.pentaho.di.core.gui.GCInterface in project pentaho-kettle by pentaho.

the class MetricsPainterTest method testDrawTimeScaleLineInfinityLoop.

@Test(timeout = 1000)
public void testDrawTimeScaleLineInfinityLoop() {
    GCInterface gCInterfaceMock = mock(GCInterface.class);
    when(metricsPainter.getGc()).thenReturn(gCInterfaceMock);
    doCallRealMethod().when(metricsPainter).drawTimeScaleLine(heightStub, pixelsPerMsStub, periodInMsStub);
    when(gCInterfaceMock.textExtent(anyString())).thenReturn(mock(Point.class));
    metricsPainter.drawTimeScaleLine(heightStub, pixelsPerMsStub, periodInMsStub);
}
Also used : GCInterface(org.pentaho.di.core.gui.GCInterface) Point(org.pentaho.di.core.gui.Point) Test(org.junit.Test)

Aggregations

GCInterface (org.pentaho.di.core.gui.GCInterface)6 Point (org.pentaho.di.core.gui.Point)5 ArrayList (java.util.ArrayList)3 BufferedImage (java.awt.image.BufferedImage)2 Image (org.eclipse.swt.graphics.Image)2 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)2 AreaOwner (org.pentaho.di.core.gui.AreaOwner)2 ScrollBarInterface (org.pentaho.di.core.gui.ScrollBarInterface)2 SwingGC (org.pentaho.di.core.gui.SwingGC)2 JobPainter (org.pentaho.di.job.JobPainter)2 JobEntryCopy (org.pentaho.di.job.entry.JobEntryCopy)2 TransPainter (org.pentaho.di.trans.TransPainter)2 SWTGC (org.pentaho.di.ui.spoon.SWTGC)2 SwtScrollBar (org.pentaho.di.ui.spoon.SwtScrollBar)2 Rectangle (org.eclipse.swt.graphics.Rectangle)1 Test (org.junit.Test)1 SwtUniversalImage (org.pentaho.di.core.SwtUniversalImage)1 JobEntryResult (org.pentaho.di.job.JobEntryResult)1 JobMeta (org.pentaho.di.job.JobMeta)1 TransMeta (org.pentaho.di.trans.TransMeta)1