Skip to content

Commit

Permalink
Use awt for keycodes
Browse files Browse the repository at this point in the history
Fixes #51
  • Loading branch information
albfan committed Sep 15, 2018
1 parent 6d6e9e2 commit bd3daf8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/org/jmeld/JMeldTest.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package org.jmeld;

import javafx.scene.input.KeyCode;
import junit.framework.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.netbeans.jemmy.ClassReference;
import org.netbeans.jemmy.operators.JFrameOperator;

import java.awt.event.KeyEvent;

public class JMeldTest {

@Before
Expand All @@ -25,7 +26,7 @@ public void testMain() {
new ClassReference("org.jmeld.JMeld").startApplication();

JFrameOperator frameOperator = new JFrameOperator("JMeld");
frameOperator.pushKey(KeyCode.F4.ordinal(), KeyCode.ALT.ordinal());
frameOperator.pushKey(KeyEvent.VK_F4, KeyEvent.ALT_DOWN_MASK);
} catch (Exception e) {
Assert.fail(e.getMessage());
}
Expand Down

0 comments on commit bd3daf8

Please sign in to comment.