61 Commits

Author SHA1 Message Date
bb0d11d10c
test: use JRE8+ version of WireMock for offline testing
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-04-13 17:48:09 +02:00
6fd21e2a03 update dependencies
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-02 15:20:23 +02:00
cecd76ea10 JavaDoc++
All checks were successful
continuous-integration/drone/push Build is passing
2021-01-30 18:20:21 +01:00
465767342f update copyright notice to 2021
All checks were successful
continuous-integration/drone/push Build is passing
2021-01-30 17:35:48 +01:00
e723cd4096 extend unit tests for UraClientConfiguration
Timeout values are tested in different cases, but for completeness the
unit test for UraClientConfiguration checks the values now, too.
2021-01-30 17:34:40 +01:00
6bf976c010 add timeout configuration to asynchronous trip reader 2021-01-30 16:49:42 +01:00
9e84d9f40d implement connection and read timeouts for synchronous requests 2021-01-30 16:49:42 +01:00
b80da71014 remove future from trip reader after closing
All checks were successful
continuous-integration/drone/push Build is passing
Future was not removed from the reader instance after close() has been
called, so re-opening was not possible. Remove the instance after
termination allows calling open() again.
2020-10-14 14:19:53 +02:00
69f9e0124a migrate AsyncUraTripReader to Java 11 HttpClient with custom subscriber
All checks were successful
continuous-integration/drone/push Build is passing
Instead of reading the InputStream we now use a custom line subscriber
which asynchronously processes each JSON line from the response.
2020-10-14 09:29:55 +02:00
304ab9db7a add unit tests for IOException handling
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-02 11:00:12 +02:00
76c9e59244 remove module-info from test sources and re-enable surefire forks
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-08 17:56:35 +02:00
d4fcedc7ca use StringBuilder for URL generation and extract repeated null checks
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-02 16:47:59 +02:00
9c82481eb5
introduce custom exception class instead of RuntimeExceptions (#10)
All checks were successful
continuous-integration/drone/push Build is passing
We now use a custom, checked exceptions on errors that can occur
with the API communication or configuration. instead of throwing an
unchecked IllegalStateException.
2020-09-02 15:47:41 +02:00
b14d040e4f adjust error messages for failed read operations
All checks were successful
continuous-integration/drone/push Build is passing
The error message "failed to read from API" is quite generic.
We now add the information what should have been read from API
if possible.
2020-08-12 11:50:42 +02:00
8017f2671d add Serializable type to unserialized JSON lists
We don't know about the exact data type from the JSON mapper,
so we make it explicitly unknown, but at least Serializable here.
2020-08-12 11:48:55 +02:00
9b80a4e889 introduce UraClientConfiguration class to encapsulate client config
Legacy constructors use new pattern internally.
2020-05-22 09:41:04 +02:00
7be56ad740 add module-info 2020-05-22 09:40:02 +02:00
88c10d5333 rewrite HTTP requests using Java 11 HTTP components 2020-05-22 09:40:02 +02:00
dfa4c55496 add serialVersionUID to to serializable classes 2020-05-09 18:55:57 +02:00
38eb883d7d minor typo fixes 2020-05-09 18:37:46 +02:00
a13dd7a194 rewrite unit tests to work with WireMock instead of class manipulation 2020-05-04 18:05:08 +02:00
706ff495e2 update copyright notice to 2020 2020-05-04 14:46:40 +02:00
bc91529721 JavaDoc corrections 2019-12-04 14:29:56 +01:00
06ce5a22cf
Merge pull request #7 from stklcode/feature/5-messages
fetch public messages from API (#5)
2019-12-04 11:59:29 +01:00
5b6c02d6a3 implement client methods for reading messages
Reading response type 2 (messages) from API with optional stop filter.
2019-11-04 18:02:59 +01:00
431de69549 typo fixes in comments and test messages [skip ci] 2019-11-04 17:55:10 +01:00
4f3d8694e1 implement model for message responses 2019-11-04 17:15:36 +01:00
2fd8d2a87c update copyright notice to 2019 2019-11-04 16:54:29 +01:00
4bb7c595c2 update Hamcrest library for testing 2019-10-20 11:51:34 +02:00
70144573d0 test: add 100ms initial delay before starting to assume anything 2019-06-20 15:00:13 +02:00
3a2f35047b test: add unit test for behavior on closed streams 2019-06-02 10:03:53 +02:00
39e1f41c0e Add AsyncTripReader constructor with single consumer argument 2019-06-02 10:03:14 +02:00
0ecceca35a Merge branch 'feature/1-streamAPI' into develop 2019-02-06 14:07:59 +01:00
7b212abdc3 Extend unit test for async stream reader 2019-02-05 20:52:10 +01:00
f0205d1cc7 Extend unit tests for accepted Non-Integer values (#2) 2018-11-17 12:32:14 +01:00
9ff4555ce8 Add URLEncoder to query paraemters to fix issue with special chars (#4) 2018-11-17 12:19:34 +01:00
90b7c5cb35 Implement stream reader for trips (#1) 2018-11-16 15:04:21 +01:00
1698622fc9 Accept NULL for vehicle ID field (fix #3) 2018-11-16 11:19:45 +01:00
b9656b386a Accept direction ID as String instead if Integer (fix #2) 2018-11-16 11:04:27 +01:00
c9444bbc97 Migrated tests to JUnit 5 and removed PowerMock dependency
As a replacement for the static mock of the URL class, the tests have
been rewritten using ByteBuddy to redefine the calling method.
2018-08-03 17:52:44 +02:00
d5e09392ef Client and model classes implement Serializable 2018-03-25 17:37:24 +02:00
d12c585083 Add package-info and overview.html for enhanced Javadoc output 2018-03-25 14:40:37 +02:00
0304f6e0f4 Update copyright notice to 2018 2018-01-01 17:28:24 +01:00
afffaa4a6f Bundled error messages for model creation in interface 2017-08-29 20:13:28 +02:00
e12775b6ae Refactored empty-checks on result lists 2017-08-29 20:13:27 +02:00
6b0481a5e1 Encapsulated errors in IllegalStateException
getList() and getStops() no longer silently ignore IOExceptions and also
do not print StackTraces any more.
2017-08-29 20:13:20 +02:00
a8fc93fb41 Model classes and input parameters declared final
As model classes are not designed for inheritance and about all method
parameters are already effectively final, they have been explicitly
declared final.
2017-08-04 10:12:12 +02:00
1f4bd9f411 Code style
Various code style improvements:
lines trimmed to 120 characters,
complete JavaDoc for public methods,
braces on multiline if-else,
fixed numbers defined as constants
2017-08-04 10:06:44 +02:00
5a93a54c64 Preparations for 1.1.0 2017-01-07 18:49:27 +01:00
d7f6c34fc0 Queries for destination, towards and GPS coordinates 2017-01-07 18:33:29 +01:00