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

Trouble Creating Mocks For Testing #107

Closed
EricMaibach opened this issue May 18, 2017 · 1 comment · Fixed by #110
Closed

Trouble Creating Mocks For Testing #107

EricMaibach opened this issue May 18, 2017 · 1 comment · Fixed by #110

Comments

@EricMaibach
Copy link

I am trying to write unit tests for my project that is using this library. For my unit tests I need to mock out the mqtt connection, so I tried to create a mock client object the implement the Client interface. However many of the methods in the Client interface return a Token interface object. The Token interface specifies a private method of flowComplete. This makes it impossible to create a mock object that implements the Token interface, which makes it impossible to create a mock object that implements the Client interface.

Is there some other way to make this work for testing that I am missing?

Thank You

@smotes
Copy link

smotes commented Jun 9, 2017

Ditto.

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