How do you create unit tests (in any programming language) for complex objects.
For example, to create the object and to have it do anything you need two instances to connect over a socket and transmit data. Or in the constructor it sits and waits for a connection or user input.
How therefore could you test that objects methods without making it/it's methods static? Declaring an instance of the object to test it would be impossible?
Question
mrface
Hi
How do you create unit tests (in any programming language) for complex objects.
For example, to create the object and to have it do anything you need two instances to connect over a socket and transmit data. Or in the constructor it sits and waits for a connection or user input.
How therefore could you test that objects methods without making it/it's methods static? Declaring an instance of the object to test it would be impossible?
Thanks
Edited by mrfaceLink to comment
Share on other sites
1 answer to this question
Recommended Posts