RFR: 1627: Add tests for bot factories

Erik Joelsson erikj at openjdk.org
Tue Oct 11 20:44:49 UTC 2022

On Mon, 10 Oct 2022 18:06:56 GMT, Zhao Song <zsong at openjdk.org> wrote:

> Add some tests for BotFactories.

I actually don't think your example looks that bad. The annoying part is having to create a real `TestHostedRepository` through the `HostedCredentials`, because that will create a real git repository on disk for each test, which gets expensive. But, since we aren't actually going to use that `TestHostedRepository` for anything other than supplying it to the factory, we can probably cheat and just create it with its public constructor, with mostly null values. (If we had been using a mock framework in Skara tests, this would have been so much easier, but as it stands we need to use semi real objects.) Same goes for the TestIssueProject. I think we can get away with not having a HostCredentials instance at all.


PR: https://git.openjdk.org/skara/pull/1393

More information about the skara-dev mailing list