< prev index next >

tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/MonocleApplicationTest.java

Print this page
rev 9491 : 8145203: Refactor systemTests for clear separation of tests
Reviewed-by: kcr

@@ -20,17 +20,19 @@
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-package com.sun.glass.ui.monocle;
+package test.robot.com.sun.glass.ui.monocle;
 
+import test.robot.com.sun.glass.ui.monocle.TestApplication;
 import com.sun.glass.events.KeyEvent;
-import com.sun.glass.ui.Application;
+import com.sun.glass.ui.monocle.MonocleApplicationShim;
 import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Test;
+import test.com.sun.glass.ui.monocle.TestRunnable;
 
 public class MonocleApplicationTest {
 
     /** Tests a US keyboard */
     private static int[][] TEST_CASES = {

@@ -133,16 +135,14 @@
     @Test
     public void testCharToKeyCode() throws Exception {
         TestApplication.getStage();
         Assume.assumeTrue(TestApplication.isMonocle());
         TestRunnable.invokeAndWait(() -> {
-            MonocleApplication app = (MonocleApplication)
-                    Application.GetApplication();
             for (int i = 0; i < TEST_CASES.length; i++) {
                 char ch = (char) TEST_CASES[i][0];
                 int expectedCode = TEST_CASES[i][1];
-                int code = app._getKeyCodeForChar(ch);
+                int code = MonocleApplicationShim._getKeyCodeForChar(ch);
                 Assert.assertEquals("Code for character "
                                     + ((int) ch) + " ('" + ch + "')",
                                     expectedCode, code);
             }
         });
< prev index next >