SimpleTCP
SimpleTCP copied to clipboard
Implement interfaces to allow mocking for unit testing
Would it be possible to implement interfaces of the SimpleTcpClient and Message classes to allow mocking in unit tests.
I suppose we could, what's your unit test scenario where that would be beneficial?
I'm writing tests to ensure that the SimpleTcpClient is called with the expected ip and port number, and set with the expected properties (Delimiter for example).
I can get so far wrapping the SimpleTcpClient in our own code but this method falls down due to Message having an internal constructor. So the simplest solution would be to provide interfaces.
I'm happy to add them and raise a PR?