summaryrefslogtreecommitdiff
path: root/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
diff options
context:
space:
mode:
authorRobert Henigan <robert.henigan@livio.io>2020-09-21 10:55:03 -0400
committerGitHub <noreply@github.com>2020-09-21 10:55:03 -0400
commit925d9c5b6e0c41fd5af166aa45bdd72125585ad8 (patch)
tree67cafde80b2663faa85e51530ffe7bd008758ad8 /android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
parentc003e108393c51dff1ec4971987ef38c793673f1 (diff)
parent9bf45a71a2649ea9f874c0b5138d4495cdd5abc4 (diff)
downloadsdl_android-925d9c5b6e0c41fd5af166aa45bdd72125585ad8.tar.gz
Merge pull request #1505 from smartdevicelink/feature/code_formatting
Reformat project code
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
index d5ee08486..db7ebdccf 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
@@ -18,13 +18,13 @@ import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.fail;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.proxy.rpc.OnButtonPress}
*/
-public class OnButtonPressTests extends BaseRpcTests{
+public class OnButtonPressTests extends BaseRpcTests {
@Override
- protected RPCMessage createMessage(){
+ protected RPCMessage createMessage() {
OnButtonPress msg = new OnButtonPress();
msg.setButtonName(TestValues.GENERAL_BUTTONNAME);
@@ -35,45 +35,45 @@ public class OnButtonPressTests extends BaseRpcTests{
}
@Override
- protected String getMessageType(){
+ protected String getMessageType() {
return RPCMessage.KEY_NOTIFICATION;
}
@Override
- protected String getCommandType(){
+ protected String getCommandType() {
return FunctionID.ON_BUTTON_PRESS.toString();
}
@Override
- protected JSONObject getExpectedParameters(int sdlVersion){
+ protected JSONObject getExpectedParameters(int sdlVersion) {
JSONObject result = new JSONObject();
- try{
+ try {
result.put(OnButtonPress.KEY_CUSTOM_BUTTON_ID, TestValues.GENERAL_INT);
result.put(OnButtonPress.KEY_BUTTON_NAME, TestValues.GENERAL_BUTTONNAME);
result.put(OnButtonPress.KEY_BUTTON_PRESS_MODE, TestValues.GENERAL_BUTTONPRESSMODE);
- }catch(JSONException e){
- fail(TestValues.JSON_FAIL);
+ } catch (JSONException e) {
+ fail(TestValues.JSON_FAIL);
}
return result;
}
/**
- * Tests the expected values of the RPC message.
- */
+ * Tests the expected values of the RPC message.
+ */
@Test
- public void testRpcValues () {
- // Test Values
- int customName = ( (OnButtonPress) msg ).getCustomButtonID();
- ButtonName buttonName = ( (OnButtonPress) msg ).getButtonName();
- ButtonPressMode buttonPressMode = ( (OnButtonPress) msg ).getButtonPressMode();
-
+ public void testRpcValues() {
+ // Test Values
+ int customName = ((OnButtonPress) msg).getCustomButtonID();
+ ButtonName buttonName = ((OnButtonPress) msg).getButtonName();
+ ButtonPressMode buttonPressMode = ((OnButtonPress) msg).getButtonPressMode();
+
// Valid Tests
assertEquals(TestValues.MATCH, TestValues.GENERAL_INT, customName);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_BUTTONNAME, buttonName);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_BUTTONPRESSMODE, buttonPressMode);
-
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BUTTONNAME, buttonName);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BUTTONPRESSMODE, buttonPressMode);
+
// Invalid/Null Tests
OnButtonPress msg = new OnButtonPress();
assertNotNull(TestValues.NOT_NULL, msg);