Skip to content
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

Add MekLocation tests #2331

Merged
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
93b30ee
Move Part::findPartImage into GUI namespace
sixlettervariables Dec 27, 2020
271e65c
Add basic MekLocation tests
sixlettervariables Dec 27, 2020
cb2bd0e
Fix test issue
sixlettervariables Dec 28, 2020
3b501d5
Add MekLocation::writeToXml test
sixlettervariables Dec 28, 2020
a4dc1f1
Remove duplicated code in MekLocation::loadFieldsFromXmlNode
sixlettervariables Dec 28, 2020
2b2916b
Add MekLocation::isSamePartType test
sixlettervariables Dec 28, 2020
2802536
Update MekLocation isSalvagingTest
sixlettervariables Dec 28, 2020
21516bf
Add basic MekLocation::updateConditionFromEntity test
sixlettervariables Dec 28, 2020
0d8feb0
Add some checkFixable and checkSalvagable tests
sixlettervariables Dec 30, 2020
34c8842
Add checkScrappable with armor test
sixlettervariables Dec 30, 2020
0b9634d
Round out checkSalvagable/checkScrappable tests
sixlettervariables Jan 2, 2021
355b57e
Simplify bad hip or shoulder in checkFixable
sixlettervariables Jan 2, 2021
1393993
Test MekLocation::updateConditionFromPart
sixlettervariables Jan 2, 2021
2f90757
Add needsFixing tests
sixlettervariables Jan 2, 2021
6eeb8a9
Test MekLocation::doMaintenanceDamage
sixlettervariables Jan 2, 2021
be7bb5d
Add basic MekLocation::remove tests
sixlettervariables Jan 2, 2021
87cc937
Match armor to getInternalForReal calls
sixlettervariables Jan 2, 2021
c2970d1
Add missing updateConditionFromEntity test
sixlettervariables Jan 2, 2021
0af50a2
Add tiny tests
sixlettervariables Jan 3, 2021
c37ffa8
Add MekLocation::getDifficulty test
sixlettervariables Jan 3, 2021
9c78420
Test MekLocation::getBaseTime
sixlettervariables Jan 3, 2021
b13ff64
Add MekLocation::fix tests
sixlettervariables Jan 3, 2021
7c64fa9
Improve getDetails to include hip/shoulder issues
sixlettervariables Jan 3, 2021
5fb955a
Test MekLocation::getDetails
sixlettervariables Jan 3, 2021
1e8735c
Remove unnecessary nags
sixlettervariables Jan 3, 2021
eb8e0b7
Fix getDetailsOnUnitTest conditions
sixlettervariables Jan 3, 2021
da762ca
Add getAllMods tests
sixlettervariables Jan 3, 2021
422d432
Test MekLocation::getDesc
sixlettervariables Jan 3, 2021
c0d7e97
Round out simple getDesc test
sixlettervariables Jan 3, 2021
9c2ee33
Fix test failure
sixlettervariables Jan 3, 2021
491ba08
Apply suggestions from code review
sixlettervariables Apr 9, 2021
b4b1061
Merge remote-tracking branch 'upstream/master' into add-more-part-uni…
sixlettervariables Apr 9, 2021
fcb52f6
Fix merge conflicts
sixlettervariables Apr 9, 2021
bc44167
Address review comments
sixlettervariables Apr 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions MekHQ/src/mekhq/campaign/Warehouse.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public Part addPart(Part part, boolean mergeWithExisting) {

if (isNewPart) {
MekHQ.triggerEvent(new PartNewEvent(part));
} else {
// Part was removed from a unit, or something similar
MekHQ.triggerEvent(new PartChangedEvent(part));
}

return part;
Expand Down
Loading