jenkinsci / gogs-webhook-plugin

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

Add unit tests #23

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.

jmMeessen commented 7 years ago

Hi @sanderv32 Could you also have a look to this Pull Request ? I am making good progress on automated integration tests. Hope to be able to submit a first version in a week or so.

sanderv32 commented 7 years ago

Certainly I will also have a look at this PR and merge it if the test doing their work. Many thanks for the effort! 🙂

jmMeessen commented 7 years ago

@sanderv32 I propose to rebase this PR tonight

sanderv32 commented 7 years ago

@jmMeessen I already changed the GogsWebHook.java to the previous PR, so if you can have a look if everything is OK then we can merge this into master.