imapmq icon indicating copy to clipboard operation
imapmq copied to clipboard

Feature: tests?

Open dbkaplun opened this issue 8 years ago • 2 comments

I find tests useful as a consumer of libraries because they contain short usage snippets of how the code is used. The idea is great, keep up the good work!

dbkaplun avatar Nov 02 '16 03:11 dbkaplun

Thanks! :) That's something I wanted to work on from the beginning, but wasn't sure how to actually do it.

I'd say the way to go would be to stub the IMAP client using https://godoc.org/github.com/mxk/go-imap/mock. That'd probably require changing some method signatures to allow injecting the stubbed clients.

mikaa123 avatar Nov 02 '16 07:11 mikaa123

How about property-based testing? I don't know about thr support for the language, but I think it can be used to test the methods with little to no changes.

gavrilovmiroslav avatar Nov 16 '16 06:11 gavrilovmiroslav