Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

patch-test-AutosaveTaskTest-use-rules.patch (14.4 KB ) - added by michael2402 8 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 10444/josm:

fix #13018 - Use new test rules for AutosaveTaskTest, increase coverage (patch by michael2402) - gsoc-core

comment:2 by Don-vip, 8 years ago

Milestone: 16.06

comment:3 by Don-vip, 8 years ago

In 10447/josm:

see #12994, see #13018 - checkstyle

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.