This change adds or update a swath of tests to push method code coverage numbers up.
Yes, method coverage is not super meaningful, but it is one metric that we can use to
ensure at least minimal coverage of this library.
Almost no product changes in here.
Turns out there were quite a few bugs in this area (it was exposed publicly before. Some
tweaking was needed and updates to the tests to show this working as expected.
Added back the extends Assert to the wiremock test base class so that I am not making a massive change and potentially breaking inflight work people are doing
Fixed some problems with tests trying to authenticate when you are not actually signed in. This hit rate API limiting which caused tests to hang/fail
Also fixed assertThat getting deprecated from junit
This may be controversial but it we're doing it. Having code formatting needs to be consistent
and a non-issue during code review. I'm willing modify the configuration if people see a strong
need, but formatting needs to be present and enforced.
- When we receive events from a webhook, it is non-trivial to determine which GitHub instance the event came from
or for that matter even if the event actually came from GitHub or GitHub Enterprise.
- In order to ensure that the logic for parsing events does not get replicated in clients, we need to be
able to call GitHub.parseEventPayload(Reader,Class) without knowing which GitHub the event originates from
and without the resulting objects triggering API calls back to a GitHub
- Thus we add GitHub.offline() to provide an off-line connection
- Thus we modify some of the object classes to return best-effort objects when off-line
- Add support for more of the event types into GHEventPayload
- Add tests of the event payload and accessing critical fields when using GitHub.offline()