Skip to content

Commit

Permalink
Code smell/missing asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Feb 21, 2021
1 parent 86393fd commit 6119208
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ private void pressKey(NetworkKeyControlMessage message) {
if (key.getKeyCode() != Character.MIN_VALUE) {
Log.warn("retrying with keyCode " + key.getKeyCode());
typeUnicode(key.getKeyCode());
return;
}
shout(message.getKeyChar());
}
Expand All @@ -122,7 +121,6 @@ private void releaseKey(NetworkKeyControlMessage message) {
KeyStroke key = KeyStroke.getKeyStroke(message.getKeyChar(), 0);
if (key.getKeyCode() != Character.MIN_VALUE) {
releaseUnicode();
return;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void testHandleMessageReleaseTurkishLowerSpecialSTypedOnNonTurkishAssisted() {
// when
controlMessageHandler.handleMessage(message);
// then
robot.keyRelease(KeyEvent.VK_SHIFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
verify(robot).keyRelease(KeyEvent.VK_SHIFT);
verify(robot).keyRelease(KeyEvent.VK_CONTROL);
}

@Test
Expand Down Expand Up @@ -100,7 +100,7 @@ void testHandleMessageReleaseTurkishUpperSpecialSTypedOnNonTurkishAssisted() {
// when
controlMessageHandler.handleMessage(message);
// then
robot.keyRelease(KeyEvent.VK_SHIFT);
robot.keyRelease(KeyEvent.VK_CONTROL);
verify(robot).keyRelease(KeyEvent.VK_SHIFT);
verify(robot).keyRelease(KeyEvent.VK_CONTROL);
}
}

0 comments on commit 6119208

Please sign in to comment.