Changeset 11129 in josm for trunk/test


Ignore:
Timestamp:
2016-10-15T00:17:47+02:00 (3 years ago)
Author:
simon04
Message:

fix #13799 - Use builder pattern for TestError

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanelTest.java

    r10962 r11129  
    4242
    4343        ValidatorTreePanel vtp = new ValidatorTreePanel(new ArrayList<>(Arrays.asList(
    44                 new TestError(null, Severity.ERROR, "err", 0, new Node(1)),
    45                 new TestError(null, Severity.WARNING, "warn", 0, new Node(2)))));
     44                TestError.builder(null, Severity.ERROR, 0)
     45                        .message("err")
     46                        .primitives(new Node(1))
     47                        .build(),
     48                TestError.builder(null, Severity.WARNING, 0)
     49                        .message("warn")
     50                        .primitives(new Node(2))
     51                        .build())));
    4652        assertNotNull(vtp);
    4753        assertEquals(2, vtp.getErrors().size());
     
    4955        vtp.setVisible(false);
    5056        Node n = new Node(10);
    51         vtp.setErrors(Arrays.asList(new TestError(null, Severity.ERROR, "", 0, n)));
     57        vtp.setErrors(Arrays.asList(TestError.builder(null, Severity.ERROR, 0)
     58                .message("")
     59                .primitives(n)
     60                .build()));
    5261        assertEquals(1, vtp.getErrors().size());
    5362        vtp.selectRelatedErrors(Collections.<OsmPrimitive>singleton(n));
Note: See TracChangeset for help on using the changeset viewer.