Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITwitchAPI is not mockable #83

Open
Mabiro opened this issue Sep 8, 2018 · 5 comments
Open

ITwitchAPI is not mockable #83

Mabiro opened this issue Sep 8, 2018 · 5 comments

Comments

@Mabiro
Copy link

Mabiro commented Sep 8, 2018

I am looking forward to using TwitchLib.Api for a project I am currently working on, but it does look like ITwitchAPI can't correctly be mocked and used in unit tests.

Having ITwitchAPI define concrete type as properties makes it impossible to mock the underlying implementation.

Am I missing something here? Are there plans to make it more unit-test friendly?

@Mahsaap
Copy link
Member

Mahsaap commented Sep 8, 2018

Pretty sure its in the works. Latest nuget doesnt have the ability. V3 when its ready should. @lucky can verify as he is working on it.

@lucky
Copy link

lucky commented Sep 8, 2018

I think you tagged the wrong person

@Mahsaap
Copy link
Member

Mahsaap commented Sep 8, 2018

.... Sry ya lucky7even . tagging on mobile sucks

@LuckyNoS7evin
Copy link
Member

Hi @Mabiro we are working on the testability of the library at the moment. You will find in the Dev branch there is a test project going in. You are right about the concrete items and we are working on those as well. The library wasn't designed to be testable from the beginning. Slowly improving.

@Mabiro
Copy link
Author

Mabiro commented Sep 8, 2018

Thank you for the quick reply. I'll take a look at the dev branch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants