Skip to content

Commit efc3385

Browse files
Fix an issue in SoftButtonState tests
1 parent a0220a1 commit efc3385

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SoftButtonManagerTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.smartdevicelink.proxy.rpc.enums.ImageType;
2222
import com.smartdevicelink.proxy.rpc.enums.SoftButtonType;
2323
import com.smartdevicelink.proxy.rpc.enums.StaticIconName;
24+
import com.smartdevicelink.proxy.rpc.enums.SystemAction;
2425
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
2526
import com.smartdevicelink.test.Validator;
2627

@@ -209,8 +210,9 @@ public void testSoftButtonState(){
209210
SoftButton softButtonExpectedValue = new SoftButton(SoftButtonType.SBT_BOTH, SoftButtonObject.SOFT_BUTTON_ID_NOT_SET_VALUE);
210211
softButtonExpectedValue.setText("o1s1");
211212
softButtonExpectedValue.setImage(new Image(artworkExpectedValue.getName(), ImageType.DYNAMIC));
213+
softButtonExpectedValue.setSystemAction(SystemAction.DEFAULT_ACTION);
212214
SoftButton actual = softButtonState1.getSoftButton();
213-
assertTrue("Returned SoftButton doesn't match the expected value", Validator.validateSoftButton(softButtonExpectedValue, softButtonState1.getSoftButton()));
215+
assertTrue("Returned SoftButton doesn't match the expected value", Validator.validateSoftButton(softButtonExpectedValue, actual));
214216
}
215217

216218
public void testSoftButtonObject(){
@@ -233,6 +235,7 @@ public void testSoftButtonObject(){
233235
// Test SoftButtonObject.getCurrentStateSoftButton()
234236
SoftButton softButtonExpectedValue = new SoftButton(SoftButtonType.SBT_TEXT, softButtonObject2Id);
235237
softButtonExpectedValue.setText("o2s1");
238+
softButtonExpectedValue.setSystemAction(SystemAction.DEFAULT_ACTION);
236239
assertTrue("Returned current state SoftButton doesn't match the expected value", Validator.validateSoftButton(softButtonExpectedValue, softButtonObject2.getCurrentStateSoftButton()));
237240

238241

0 commit comments

Comments
 (0)