Skip to content

Added unit tests for escaped quotes. #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2016
Merged

Added unit tests for escaped quotes. #45

merged 1 commit into from
May 2, 2016

Conversation

brianrussell2
Copy link

Per the comments in the associated pull request, adding unit tests for escaped quotes.

@johnjaylward
Copy link
Contributor

johnjaylward commented Apr 25, 2016

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.

@brianrussell2
Copy link
Author

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?

@stleary
Copy link
Owner

stleary commented Apr 27, 2016

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.

@stleary stleary merged commit 77d0873 into stleary:master May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants