The TestRuntime class provides access to a testing environment including a Kanzi Domain. More...
Public Member Functions | |
| TestRuntime (Object context) | |
| Construct a TestRuntime object. | |
| void | advanceMockClock (long durationNS) |
| Advances the Main Loop Scheduler's mock clock the given number of nanoseconds. | |
| void | close () |
| Close the TestRuntime object. | |
| void | enableMockClock () |
| Enables the mock clock in Main Loop Scheduler, that can be adjusted manually in exact nanosecond precision. | |
| void | generateTouchClick (float x, float y) |
| Generates a click (touch down, touch up) in specified coordinates. | |
| Domain | getDomain () |
| Gets the Domain for the Test Environment. | |
| Scene | getScene () |
| Gets the Scene for the Test Environment. | |
| Node2D | getScreen () |
| Gets the Screen for the Test Environment. | |
| boolean | loadLuaScriptAndRun (String script, Node node) |
| void | reloadGPUResources () |
| Trigger a reload of GPU Resources. | |
Static Public Member Functions | |
| static void | LoadKanziLibraries () |
| Load the native Kanzi libraries. | |
The TestRuntime class provides access to a testing environment including a Kanzi Domain.
It is only intended to be used for non-production testing purposes.
| TestRuntime | ( | Object | context | ) |
Construct a TestRuntime object.
Typically, this is called in the setup of a test fixture.
| context | The platform context (i.e. Android Application Context) or null if no context is needed. |
| void close | ( | ) |
Close the TestRuntime object.
Typically, this is called in the teardown of a test fixture.
Generates a click (touch down, touch up) in specified coordinates.
| x | The x coordinate of the click. |
| y | The y coordinate of the click. |
| Domain getDomain | ( | ) |
Gets the Domain for the Test Environment.
| Scene getScene | ( | ) |
Gets the Scene for the Test Environment.
| Node2D getScreen | ( | ) |
Gets the Screen for the Test Environment.