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

opacapp / opacclient / 1882
21%

Build:
DEFAULT BRANCH: master
Ran 03 Nov 2020 07:52AM UTC
Jobs 1
Files 60
Run time 9s
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
1882

push

travis-ci

web-flow
SLUB: Get Results by Id for Lent and Reserved Items (#598)

* SLUB: Put prefix "id" before id identifier

to prepare for different kinds of identifiers

* SLUB: Test for getResultById

This test is not ideal as the test should just verify that parseResultById
will be called with correct id but not actually call it. So it should be

Mockito.doReturn(DetailedItem()).`when`(slub).parseResultById(Matchers.any(), Matchers.any())
...
verify(slub).parseResultById("id/123", JSONObject(response))

but this throws an IllegalStateException: Mockito.any() must not be null because of
the not nullable Kotlin function signature of parseResultById. None of the solutions
from  https://stackoverflow.com/questions/30305217/is-it-possible-to-use-mockito-in-kotlin
work. See also https://github.com/mockito/mockito/issues/1255.
The only possible solution seems to be switching to MockK.

* SLUB: Get actual id from JSON instead of using id passed in as argument

to call of getResultById and hence parseResultById as the actual identifier
obtained in the process may differ from the one used to call the method.

* SLUB: make getResultById work for bc identifiers

Get id identifier from bc identifier by intercepting redirect from bc to id. This requires
to unset client's followRedirections property by building a new client based on the client
of OkHttpBaseApi.

* SLUB: test code cleanup

- remove empty primary constructor
- remove redundant qualifier name
- optimize imports

* SLUB: fallback in getResultById for legacy id identifiers without prefix

which could result from items added to favorites list before commit 31d6006.
Also add final '/' to identifier when checking (in case a legacy identifier
starts with the characters 'id' which are not a prefix in this case).
Make implicit support for 'rsn' identifiers (currently not used) explicit.

3051 of 14426 relevant lines covered (21.15%)

0.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1882.1 03 Nov 2020 07:52AM UTC 0
21.15
Travis Job 1882.1
Source Files on build 1882
  • Tree
  • List 60
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1882
  • c36c0f4d on github
  • Prev Build on master (#1880)
  • Next Build on master (#1884)
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

© 2025 Coveralls, Inc