danesparza / MailChimp.NET

:envelope: .NET Wrapper for the MailChimp v2.0 API
MIT License
179 stars 119 forks source link

Creating a IMailChimpManager interface #138

Closed lxalln closed 9 years ago

lxalln commented 9 years ago

Hi,

We're using this library, and it's serving us really well. The only downside is that it's not particularly helpful to being Mocked for testing. Would you be open to me submitting a PR adding interfaces for MailChimpManager and MailChimpExportManager?

Thanks for your hard work, Alex

danesparza commented 9 years ago

@cntwo that sounds good. It would be helpful if you also updated the README with a note about it, and gave some guidance to how you intended the mocking to work. (Nothing too fancy, just enough to get the idea.) An example test in the testing project would probably be a good idea as well. Thoughts?

lxalln commented 9 years ago

That sounds like a good plan. I'll put something together and get a PR submitted.

lxalln commented 9 years ago

Hi Dan,

It looks like there is no built in mocking framework. We use Moq, however that would seem a little heavy to add as a dependency to the MailChimp.Tests project.

An example test wouldn't make much sense without the supporting framework, so I am more than happy to provide a more thorough example in the README.

What do you think?

Alex