Modify ↓
Opened 8 years ago
Closed 8 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 )
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 org.openstreetmap.josm.plugins.turnrestrictions.editor.JosmSelectionListModel@6f6c2408 at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:402) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:650) at org.openstreetmap.josm.plugins.turnrestrictions.editor.JosmSelectionListModelTest.test_editLayerChanged(JosmSelectionListModelTest.groovy:148) at org.openstreetmap.josm.testutils.JOSMTestRules$1.evaluate(JOSMTestRules.java:143) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
Attachments (0)
Change History (3)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Note:
See TracTickets
for help on using tickets.
(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 toselectionChanged
in the constructor is ignored.