jenkinsci / gogs-webhook-plugin

Jenkins Gogs Webhook
https://plugins.jenkins.io/gogs-webhook/
MIT License
79 stars 42 forks source link

Adding some unit tests #26

Closed jmMeessen closed 7 years ago

jmMeessen commented 7 years ago

I propose with this pull request to add some unit tests to the codebase. With the help of Mockito, the dependencies are mocked. While adding the tests for the various parameters, it appeared that some validations could be improved.

There is still work to do to reach an acceptable unit test coverage but I wanted to submit this first batch to get some feedback.

This PR superseeds PR #23 (consequence of the rebase after merging PR #20)