Fix 1429: mounted.getLinked() is null #1433
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the MML addendum to the MM fix to #1429.
Technically it isn't necessary as the offending calls will be handled correctly once MegaMek/megamek#5176 goes in, but this PR cleans the original calls up as passing
null
as a weapon value is ugh.This PR also adds unit tests to:
EquipmentTableModel
of each unit type can be populated and read;EquipmentTableModel.getDamageString()
(used to populate the damage field in the table) works correctly with Aerospace, CI, and Artillery;said unit tests to be run via the "Verification/test" gradle task prior to any PR submissions.
There are still many, many areas within MML that need unit test coverage, but at least this gets the ball rolling.
NOTE:
The tests in this PR will continue to fail until MegaMek/megamek#5176 is pulled.