Added unit tests for escaped quotes.#45
Added unit tests for escaped quotes.#45stleary merged 1 commit intostleary:masterfrom brianrussell2:master
Conversation
|
I'm more familiar with TestNG, but I see that some of the existing test have things like this: @Test(expected=NullPointerException.class)Is it possible to use the same notation for your tests with Junit? In TestNG I know you can't specify the message expected, but maybe JUnit lets you? It would make the test cases simpler if you could. --EDIT Regardless, these look good and appear to cover the use cases of the code change. I don't see any need to change them except possibly for readability. |
|
I'm not as familiar with JUnit either, so I'll follow whatever convention you prefer (I just tried to copy what I already saw in the CDL tests). Aside from the test cases that are expecting to generate a NullPointerException, I only saw "@test" used. For that reason, I only prefaced each test case with "@test". What convention do you have in mind as an alternative? |
|
Looks good, thanks for taking the time to do the unit tests. Either style for catching exceptions is acceptable. Will merge after the JSON-Java change is accepted. |
Per the comments in the associated pull request, adding unit tests for escaped quotes.