]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.autoui/src/main/java/org/argeo/slc/autoui/internal/AutoUiApplicationJemmy.java
Restructure Jemmy tests prototype
[gpl/argeo-slc.git] / org.argeo.slc.autoui / src / main / java / org / argeo / slc / autoui / internal / AutoUiApplicationJemmy.java
diff --git a/org.argeo.slc.autoui/src/main/java/org/argeo/slc/autoui/internal/AutoUiApplicationJemmy.java b/org.argeo.slc.autoui/src/main/java/org/argeo/slc/autoui/internal/AutoUiApplicationJemmy.java
deleted file mode 100644 (file)
index d220742..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.argeo.slc.autoui.internal;
-
-import org.argeo.slc.autoui.AutoUiActivator;
-import org.argeo.slc.autoui.AutoUiApplication;
-import org.netbeans.jemmy.ClassReference;
-import org.netbeans.jemmy.operators.JButtonOperator;
-import org.netbeans.jemmy.operators.JFrameOperator;
-import org.netbeans.jemmy.operators.JLabelOperator;
-
-public class AutoUiApplicationJemmy implements AutoUiApplication {
-       public void run() {
-               try {
-                       execute(new Object());
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       throw new RuntimeException("Could not execute as Runnable", e);
-               }
-       }
-
-       public Object execute(Object object) throws Exception {
-
-               String className = "org.argeo.slc.jemmytest.ui.SwingTestUi";
-               // String[] args = {};
-               // SwingTestUi.main(args);
-               // Start application
-               ClassReference classReference = new ClassReference(className);
-               String[] args = { "noExitOnClose" };
-               classReference.startApplication(args);
-
-               // Find components
-               JFrameOperator jFrameOperator = new JFrameOperator("HelloWorldSwing");
-               JButtonOperator jButtonOperator = new JButtonOperator(jFrameOperator,
-                               "Button");
-               JLabelOperator jLabelOperator = new JLabelOperator(jFrameOperator,
-                               "Hello World");
-
-               // Execute actions
-               jButtonOperator.push();
-
-               // Performs checks
-               String textAfterPush = jLabelOperator.getText();
-               AutoUiActivator.stdOut("textAfterPush=" + textAfterPush);
-
-               return null;
-       }
-
-}