Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <berryUITestCase.h>
Classes | |
class | TestWindowListener |
Public Member Functions | |
UITestCase (const QString &testName) | |
virtual void | DoSetUp () |
virtual void | DoTearDown () |
void | failexc (const QString &message, const std::exception &e, long lineNumber=-1, const QString &fileName="unknown") |
IWorkbenchWindow::Pointer | OpenTestWindow () |
IWorkbenchWindow::Pointer | OpenTestWindow (const QString &perspectiveId) |
void | CloseAllTestWindows () |
IWorkbenchPage::Pointer | OpenTestPage (const IWorkbenchWindow::Pointer &win) |
QList< IWorkbenchPage::Pointer > | OpenTestPage (const IWorkbenchWindow::Pointer &win, int pageTotal) |
void | CloseAllPages (const IWorkbenchWindow::Pointer &window) |
Public Member Functions inherited from berry::TestCase | |
TestCase (const QString &testName) | |
void | setUp () |
void | tearDown () |
Static Public Member Functions | |
static IAdaptable * | GetPageInput () |
Protected Member Functions | |
void | Trace (const QString &msg) |
void | setUp () |
void | tearDown () |
void | ManageWindows (bool manage) |
IWorkbench * | GetWorkbench () |
Protected Member Functions inherited from berry::TestCase | |
void | LeakDetailsOn () |
void | IgnoreLeakingObjects () |
Static Protected Member Functions | |
static void | ProcessEvents () |
Protected Attributes | |
IWorkbench * | fWorkbench |
UITestCase
is a useful super class for most UI tests cases. It contains methods to create new windows and pages. It will also automatically close the test windows when the tearDown method is called.
Definition at line 39 of file berryUITestCase.h.
berry::UITestCase::UITestCase | ( | const QString & | testName | ) |
Definition at line 36 of file berryUITestCase.cpp.
References fWorkbench, and berry::PlatformUI::GetWorkbench().
void berry::UITestCase::CloseAllPages | ( | const IWorkbenchWindow::Pointer & | window | ) |
Close all pages within a window.
Definition at line 114 of file berryUITestCase.cpp.
void berry::UITestCase::CloseAllTestWindows | ( | ) |
Close all test windows.
Definition at line 78 of file berryUITestCase.cpp.
Referenced by DoTearDown().
|
virtual |
Sets up the fixture, for example, open a network connection. This method is called before a test is executed. The default implementation does nothing. Subclasses may extend.
Reimplemented from berry::TestCase.
Definition at line 135 of file berryUITestCase.cpp.
|
virtual |
Tears down the fixture, for example, close a network connection. This method is called after a test is executed. The default implementation closes all test windows, processing events both before and after doing so. Subclasses may extend.
Reimplemented from berry::TestCase.
Definition at line 147 of file berryUITestCase.cpp.
References CloseAllTestWindows(), and ProcessEvents().
void berry::UITestCase::failexc | ( | const QString & | message, |
const std::exception & | e, | ||
long | lineNumber = -1 , |
||
const QString & | fileName = "unknown" |
||
) |
Fails the test due to the given throwable.
Definition at line 43 of file berryUITestCase.cpp.
|
static |
Returns the workbench page input to use for newly created windows.
Definition at line 31 of file berryUITestCase.cpp.
Referenced by OpenTestWindow().
|
protected |
Returns the workbench.
Definition at line 167 of file berryUITestCase.cpp.
References fWorkbench.
|
protected |
Set whether the window listener will manage opening and closing of created windows.
Definition at line 162 of file berryUITestCase.cpp.
IWorkbenchPage::Pointer berry::UITestCase::OpenTestPage | ( | const IWorkbenchWindow::Pointer & | win | ) |
Open a test page with the empty perspective in a window.
Definition at line 87 of file berryUITestCase.cpp.
QList< IWorkbenchPage::Pointer > berry::UITestCase::OpenTestPage | ( | const IWorkbenchWindow::Pointer & | win, |
int | pageTotal | ||
) |
Open "n" test pages with the empty perspective in a window.
Definition at line 96 of file berryUITestCase.cpp.
IWorkbenchWindow::Pointer berry::UITestCase::OpenTestWindow | ( | ) |
Open a test window with the empty perspective.
Definition at line 57 of file berryUITestCase.cpp.
References berry::EmptyPerspective::PERSP_ID.
IWorkbenchWindow::Pointer berry::UITestCase::OpenTestWindow | ( | const QString & | perspectiveId | ) |
Open a test window with the provided perspective.
Definition at line 62 of file berryUITestCase.cpp.
References fWorkbench, GetPageInput(), and berry::IWorkbench::OpenWorkbenchWindow().
|
staticprotected |
Definition at line 154 of file berryUITestCase.cpp.
Referenced by DoTearDown().
|
protected |
Simple implementation of setUp. Subclasses are prevented from overriding this method to maintain logging consistency. DoSetUp() should be overriden instead.
Definition at line 126 of file berryUITestCase.cpp.
References berry::TestCase::setUp(), and Trace().
|
protected |
Simple implementation of tearDown. Subclasses are prevented from overriding this method to maintain logging consistency. DoTearDown() should be overriden instead.
Definition at line 140 of file berryUITestCase.cpp.
References berry::TestCase::tearDown(), and Trace().
|
protected |
Outputs a trace message to the trace output device, if enabled. By default, trace messages are sent to System.out
.
msg | the trace message |
Definition at line 121 of file berryUITestCase.cpp.
Referenced by setUp(), and tearDown().
|
protected |
Definition at line 170 of file berryUITestCase.h.
Referenced by GetWorkbench(), OpenTestWindow(), and UITestCase().