Modify ↓
#13018 closed enhancement (fixed)
[Patch] Use new test rules for AutosaveTaskTest, increase coverage.
Reported by: | michael2402 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.06 |
Component: | Unit tests | Version: | |
Keywords: | gsoc-core | Cc: | Don-vip, bastiK, stoecker |
Description
Code coverage for AutosaveTask was 31%, is >80% now. Error checking is missing in tests but basic features should be covered.
This test requires some adjustments to AutosaveTask / Main:
- recoverUnsavedLayers returns a Future to wait for.
- recoverUnsavedLayers now waits until OpenFileTask is done before loading.
- Add a special call to mainPanel.reAddListeners to main at the right place to only add that listener if main is started (JOSMFixture does it's own add). Not nice but it is the best for now without throwing all of JOSM startup over.
And I added some code cleanup:
- addLayerChangeListener(..., true) fires the listener on every layer. This shortens the code.
- add documentation
- do not let tests clean the layers they added - JOSMTestRule does this.
Attachments (1)
Change History (4)
Changed 7 years ago by
Attachment: | patch-test-AutosaveTaskTest-use-rules.patch added |
---|
comment:1 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 7 years ago by
Milestone: | → 16.06 |
---|
Note: See
TracTickets for help on using
tickets.
In 10444/josm: