All Questions
2 questions
-1
votes
1
answer
572
views
How to write tests for a class that talks to a server without revealing connection implementation
I'm writing a class that acts as the interface to a server. The interface exposes a way to send messages to the server and pass messages back to the client through a callback. Implementations should ...
7
votes
1
answer
673
views
How should the code for a program outputting to command line be tested/designed?
Imagine a program similar to this in Python:
import subprocess
class Example():
_cmd_args = (['ls', '-a', '/usr/bin/'], ['ls', '-al', '/usr/local/bin/'])
_default_args = 0
def init(...