-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0285] ShowConstantTBT Description Update #1581
[0285] ShowConstantTBT Description Update #1581
Conversation
@santanamk ready for the Ford review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I have reviewed this PR. The code looks good. Please review whenever you get the chance, and make changes as needed.
@@ -4,7 +4,7 @@ | |||
import com.smartdevicelink.protocol.enums.FunctionID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would revert these changes in ShowConstantTbtTests.java
. They are valid changes, but are out of scope of the PR.
@@ -3,7 +3,7 @@ | |||
import com.smartdevicelink.marshal.JsonRPCMarshaller; | |||
import com.smartdevicelink.protocol.enums.FunctionID; | |||
import com.smartdevicelink.proxy.RPCMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would revert these changes in ShowConstantTbtResponseTests.java
. This PR only deals with the ShowConstantTbtRequest
so these changes are out of scope of the PR.
@@ -44,23 +44,31 @@ | |||
* | |||
* @since SmartDeviceLink 2.0 | |||
*/ | |||
public class ShowConstantTbtResponse extends RPCResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would revert these changes in ShowConstantTbtResponse.java
. This PR only deals with the ShowConstantTbtRequest
so these changes are out of scope of the PR.
|
||
public static final String KEY_TEXT1 = "navigationText1"; | ||
public static final String KEY_TEXT2 = "navigationText2"; | ||
public static final String KEY_ETA = "eta"; | ||
public static final String KEY_TOTAL_DISTANCE = "totalDistance"; | ||
public static final String KEY_MANEUVER_DISTANCE = "distanceToManeuver"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss Lines 59-60 and 206-252 are good.
I would revert the other changes, since they are out of scope of the PR.
@santhanamk implementing experience gained while fixing the 0236 - this will cause the crash of the generic tests, which are testing the structures under the hood. Do we still need to rollback these changes? (they are according to XML provided) |
@KostyaBoss I would roll back the changes in: I believe that the changes in these three files are out of the scope of the PR. I went through and reviewed what needs to be changed in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I have reviewed the PR. Please take a look at the suggestions, and make the changes as needed whenever you get the chance.
@@ -49,34 +50,33 @@ | |||
* @see UpdateTurnList | |||
* @since SmartDeviceLink 2.0 | |||
*/ | |||
public class ShowConstantTbt extends RPCRequest { | |||
public class ShowConstantTBT extends RPCRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 53. Changing the name of the class is out of scope of the PR.
*/ | ||
public ShowConstantTbt() { | ||
public ShowConstantTBT() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 70. Changing the name of the class is out of scope of the PR.
public static final String KEY_MANEUVER_IMAGE = "turnIcon"; | ||
public static final String KEY_NEXT_MANEUVER_IMAGE = "nextTurnIcon"; | ||
public static final String KEY_MANEUVER_COMPLETE = "maneuverComplete"; | ||
public static final String KEY_SOFT_BUTTONS = "softButtons"; | ||
public static final String KEY_TIME_TO_DESTINATION = "timeToDestination"; | ||
|
||
/** | ||
* Constructs a new ShowConstantTbt object | ||
* Constructs a new ShowConstantTBT object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 68. Changing the name of the class is out of scope of the PR.
* | ||
* @param hash The Hashtable to use | ||
*/ | ||
public ShowConstantTbt(Hashtable<String, Object> hash) { | ||
public ShowConstantTBT(Hashtable<String, Object> hash) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 79. Changing the name of the class is out of scope of the PR.
super(FunctionID.SHOW_CONSTANT_TBT.toString()); | ||
} | ||
|
||
/** | ||
* Constructs a new ShowConstantTbt object indicated by the Hashtable parameter | ||
* <p> | ||
* Constructs a new ShowConstantTBT object indicated by the Hashtable parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 75. Changing the name of the class is out of scope of the PR.
*/ | ||
public ShowConstantTbt setDistanceToManeuver(Double distanceToManeuver) { | ||
setParameters(KEY_MANEUVER_DISTANCE, distanceToManeuver); | ||
public ShowConstantTBT setDistanceToManeuver(Double distanceToManeuver) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 212. Changing the name of the class is out of scope of the PR.
*/ | ||
public ShowConstantTbt setDistanceToManeuverScale(Double distanceToManeuverScale) { | ||
setParameters(KEY_MANEUVER_DISTANCE_SCALE, distanceToManeuverScale); | ||
public ShowConstantTBT setDistanceToManeuverScale(Double distanceToManeuverScale) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 237. Changing the name of the class is out of scope of the PR.
@@ -251,7 +259,7 @@ public Double getDistanceToManeuverScale() { | |||
* | |||
* @param maneuverComplete a Boolean value | |||
*/ | |||
public ShowConstantTbt setManeuverComplete(Boolean maneuverComplete) { | |||
public ShowConstantTBT setManeuverComplete(Boolean maneuverComplete) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 262. Changing the name of the class is out of scope of the PR.
@@ -273,7 +281,7 @@ public Boolean getManeuverComplete() { | |||
* | |||
* @param softButtons a List<SoftButton> value | |||
*/ | |||
public ShowConstantTbt setSoftButtons(List<SoftButton> softButtons) { | |||
public ShowConstantTBT setSoftButtons(List<SoftButton> softButtons) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 284. Changing the name of the class is out of scope of the PR.
@@ -289,7 +297,7 @@ public ShowConstantTbt setSoftButtons(List<SoftButton> softButtons) { | |||
return (List<SoftButton>) getObject(SoftButton.class, KEY_SOFT_BUTTONS); | |||
} | |||
|
|||
public ShowConstantTbt setTimeToDestination(String timeToDestination) { | |||
public ShowConstantTBT setTimeToDestination(String timeToDestination) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would keep the name as ShowConstantTbt
on line 300. Changing the name of the class is out of scope of the PR.
@santhanamk I am sorry for the big delay providing this answer but if we will rollback these changes, what we know from the other pr's - the generic internal tests, which are testing the RPC in the documentation will fail. These changes - according to XML file. Do we still need to rollback? |
@KostyaBoss So I spoke with Michael Crimando about this. He wrote the proposal. This is purely a description change, and nothing else. You just need to change the descriptions for those two parameters |
Codecov Report
@@ Coverage Diff @@
## develop #1581 +/- ##
=============================================
+ Coverage 56.09% 56.39% +0.29%
- Complexity 5021 5076 +55
=============================================
Files 515 521 +6
Lines 22297 22621 +324
Branches 2777 2822 +45
=============================================
+ Hits 12508 12756 +248
- Misses 8848 8882 +34
- Partials 941 983 +42 |
@santhanamk I've updated the pr, please, re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I reviewed the changes for the PR. I have a few more suggestions. They are pretty minor. The idea is just to change the descriptions for the parameters, and nothing else. Please take a look at the suggestions whenever you get the chance.
@@ -30,7 +30,7 @@ | |||
|
|||
/** | |||
* This is a unit test class for the SmartDeviceLink library project class : | |||
* {@link com.smartdevicelink.proxy.rpc.ShowConstantTbt} | |||
* {@link ShowConstantTbt} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss On line 33 I would remove it and change it back to {@link com.smartdevicelink.proxy.rpc.ShowConstantTbt}
The idea is that nothing should be changed in this class.
@@ -71,8 +71,8 @@ protected JSONObject getExpectedParameters(int sdlVersion) { | |||
result.put(ShowConstantTbt.KEY_SOFT_BUTTONS, TestValues.JSON_SOFTBUTTONS); | |||
result.put(ShowConstantTbt.KEY_ETA, TestValues.GENERAL_STRING); | |||
result.put(ShowConstantTbt.KEY_MANEUVER_COMPLETE, true); | |||
result.put(ShowConstantTbt.KEY_MANEUVER_DISTANCE, TestValues.GENERAL_DOUBLE); | |||
result.put(ShowConstantTbt.KEY_MANEUVER_DISTANCE_SCALE, TestValues.GENERAL_DOUBLE); | |||
result.put(ShowConstantTbt.KEY_DISTANCE_TO_MANEUVER, TestValues.GENERAL_DOUBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss On line 74 I would rename KEY_DISTANCE_TO_MANEUVER
back to its old variable name KEY_MANEUVER_DISTANCE
. You can apply this change throughout the class.
result.put(ShowConstantTbt.KEY_MANEUVER_DISTANCE, TestValues.GENERAL_DOUBLE); | ||
result.put(ShowConstantTbt.KEY_MANEUVER_DISTANCE_SCALE, TestValues.GENERAL_DOUBLE); | ||
result.put(ShowConstantTbt.KEY_DISTANCE_TO_MANEUVER, TestValues.GENERAL_DOUBLE); | ||
result.put(ShowConstantTbt.KEY_DISTANCE_TO_MANEUVER_SCALE, TestValues.GENERAL_DOUBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss On line 75 I would rename KEY_DISTANCE_TO_MANEUVER_SCALE
back to its old variable name KEY_MANEUVER_DISTANCE_SCALE
. You can apply this change throughout the class.
@@ -21,7 +21,7 @@ | |||
|
|||
/** | |||
* This is a unit test class for the SmartDeviceLink library project class : | |||
* {@link com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse} | |||
* {@link ShowConstantTbtResponse} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would delete line 24 and replace it with its old line {@link com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse}
@@ -33,6 +33,7 @@ | |||
|
|||
import com.smartdevicelink.protocol.enums.FunctionID; | |||
import com.smartdevicelink.proxy.RPCRequest; | |||
import com.smartdevicelink.util.SdlDataTypeConverter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would remove this import on line 36 import com.smartdevicelink.util.SdlDataTypeConverter;
.
(The idea is to just make the description changes and nothing else)
*/ | ||
public Double getDistanceToManeuverScale() { | ||
return getDouble(KEY_MANEUVER_DISTANCE_SCALE); | ||
Object object = getParameters(KEY_DISTANCE_TO_MANEUVER_SCALE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would delete lines 252-253 and replace it with the old code return getDouble(KEY_MANEUVER_DISTANCE_SCALE);
.
@@ -46,19 +46,27 @@ | |||
*/ | |||
public class ShowConstantTbtResponse extends RPCResponse { | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would delete the comment block on lines 49-51. The idea is that nothing should be changed in this file.
public ShowConstantTbtResponse() { | ||
super(FunctionID.SHOW_CONSTANT_TBT.toString()); | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would delete the comment block on lines 56-60. The idea is that nothing should be changed in this file.
public ShowConstantTbtResponse(Hashtable<String, Object> hash) { | ||
super(hash); | ||
} | ||
|
||
/** | ||
* Constructs a new ShowConstantTbtResponse object | ||
* | ||
* @param success whether the request is successfully processed | ||
* @param resultCode whether the request is successfully processed | ||
* @param success whether the request is successfully processed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would delete lines 68-69 and bring back the old formatted code.
*/ | ||
public Double getDistanceToManeuver() { | ||
return getDouble(KEY_MANEUVER_DISTANCE); | ||
Object object = getParameters(KEY_DISTANCE_TO_MANEUVER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss I would delete lines 226 and 227 and replace it with the old code return getDouble(KEY_MANEUVER_DISTANCE);
.
@santhanamk rollbacked the required changes according to your request and double-checked everything, all the comments seem to be processed. Please, let me know if some additional changes are required there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KostyaBoss Code looks good. I have approved the PR.
Once you have tested against Core and HMI (if applicable), please put the links for those PRs. Please mark the PR as ready for review, and you can tag Livio once the testing is done on your end.
@bilal-alsharifi , @jordynmackool This pr is ready for the Livio review |
Fixes #1573
This PR is [ready] for review.
Related PR's
Core
Risk
This PR makes [minor] API changes.
Testing Plan
Testing Plan
Unit Tests
Added unit tests for the new structures
Summary
Changes according to #1573
CLA