• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IQSS / dataverse / 825
4%
develop: 24%

Build:
Build:
LAST BUILD BRANCH: 11254-croissant-builtin
DEFAULT BRANCH: develop
Ran 04 Dec 2015 04:23PM UTC
Jobs 1
Files 457
Run time 14s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
825

Pull #2795

travis-ci

bencomp
Add new unit tests for JsonParser; implement getContactEmails in Dataverse

Although I promised to not spend more free time on coding for Dataverse, I couldn't
help myself after interacting with the "native API" and talking about code coverage
with @pdurbin some more.

The new tests parse JSON test files from the test resources - rather than test that
JsonPrinter output can be parsed. Only date and date-time tests test a round-trip.
I added comments to explain what the test tries to accomplish.

Although line coverage of JsonParser with these tests is > 56%, not all branches are
covered even though NetBeans may show green: inline if/else statements 'hide' some
branches in the green lines.

To make the tests pass, I added `dv.setAffiliation` in `JsonParser.parseDataverse`
with a default value of `null` if the JSON doesn't include affiliation and
implemented `Dataverse.getContactEmails` to produce a comma-separated string of
email addresses. I hope these have been good assumptions for how the API behaves.

Note that because the JsonParser works on a different level than the API, the default
values that the parser uses may be different than the business logic prescribes
(see `dv.setPermissionRoot` in `parseDataverse`). The tests expect the parser's
defaults.

Removed unused imports in JsonParserTest.
Pull Request #2795: Add new unit tests for JsonParser; implement getContactEmails in Dataverse

12 of 12 new or added lines in 2 files covered. (100.0%)

1943 of 38897 relevant lines covered (5.0%)

0.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 825.1 04 Dec 2015 04:23PM UTC 0
5.0
Travis Job 825.1
Source Files on build 825
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #825
  • Pull Request #2795
  • PR Base - 4.3 (#751)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc