Convert dom.ids.Test to JUnit - #103
Conversation
b1ce8c7 to
04cd723
Compare
| el2 = doc.getElementById("my.worker"); | ||
| Assertion.verify(el2 == el); | ||
| assertTrue("el2 == el", el2 == el); |
There was a problem hiding this comment.
assertEquals with no message
|
|
||
| el2 = doc.getElementById("one.worker"); | ||
| Assertion.verify(el2 == null); | ||
| assertTrue("el2 == null", el2 == null); |
There was a problem hiding this comment.
assertNull with no message
| el.removeAttribute("id"); | ||
| el2 = doc.getElementById("my.worker"); | ||
| Assertion.verify(el2 == null); | ||
| assertTrue("el2 == null", el2 == null); |
There was a problem hiding this comment.
assertNull with no message
| elem = doc.getElementById("default.id"); | ||
| Assertion.verify(elem !=null, "elem by id 'default.id'"); | ||
|
|
||
| assertTrue("elem by id 'default.id'", elem != null); |
There was a problem hiding this comment.
assertNotNull with no message
| elem = doc.getElementById("id02"); | ||
| Assertion.verify(elem ==null, "elem by id '02'"); | ||
| assertTrue("elem by id '02'", elem == null); |
There was a problem hiding this comment.
assertNull with no message
| elem = doc.getElementById("eb0009"); | ||
| Assertion.verify(elem !=null, "elem by id 'eb0009'"); | ||
| assertTrue("elem by id 'eb0009'", elem != null); |
There was a problem hiding this comment.
in general here and following use assertEquals and assertNull and assertNotNull and assertSame as appropriate rather than justa ssertTrrue
46e5d55 to
7f7fae5
Compare
garydgregory
left a comment
There was a problem hiding this comment.
It's seems odd to add Junit 3 code here. Why not use the latest version that supports Java 8? Junit 5 IIRC.
|
Because we're already using JUnit 3. For the moment I'm focusing on the minimum changes needed to get the tests to run. (Right now they aren't.) If more code reviewer attention becomes available, then there are a lot of improvements that could be made, though frankly upgrading JUnit is very far down the list. |
|
Thank you for the clarification. All builds are red tbough. |
Looks like the same thing being flagged on each build: |
| parser.setFeature(DEFERRED_DOM_FEATURE_ID, DEFAULT_DEFERRED_DOM); | ||
| } | ||
|
|
||
| Document doc; |
There was a problem hiding this comment.
Perhaps do this to resolve the build failure:
| Document doc; | |
| Document doc = null; |
7f7fae5 to
ef3f325
Compare
|
fixed PR #100 (range): Build failed on XML parse error in build.xml:919. The <java fork="yes" for dom.range.Test was |
|
Build passing now |
Convert the dom.ids.Test test harness from a main()-driven to JUnit 3.\