You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: