Opened 5 years ago

Closed 5 years ago

#13116 closed defect (fixed)

Failing unit test in turnrestrictions plugin

Reported by: Don-vip Owned by: team
Priority: normal Milestone:
Component: Plugin turnrestrictions Version:
Keywords: gsoc-core Cc: michael2402, bastiK

Description (last modified by Don-vip)

I have updated unit tests of turnrestrictions plugin to replace JOSMFixture by new system and face a unit test failure I don't understand:


junit.framework.AssertionFailedError: assert model.getSize() == 1
       |     |         |
       |     0         false
	at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(
	at org.openstreetmap.josm.plugins.turnrestrictions.editor.JosmSelectionListModelTest.test_editLayerChanged(JosmSelectionListModelTest.groovy:148)
	at org.openstreetmap.josm.testutils.JOSMTestRules$1.evaluate(

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by Don-vip

Description: modified (diff)

comment:2 Changed 5 years ago by michael2402

(1) I don't really see any place in that test where the model is registered as listener to any event. I think it is just not notified of any selection/active layer changes.

(2) The selection is not set in the constructor of JosmSelectionListModel. layer2 is the active data layer after adding it. So the call to selectionChanged in the constructor is ignored.

comment:3 Changed 5 years ago by Don-vip

Resolution: fixed
Status: newclosed

Thanks! Fixed in [o32629].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.