I am trying to write unit tests for a game i have created. The game is a tic tac toe implementation which interacts with the user and takes input from the command line. I am not sure how i can go about writing a test which will take and check user input. For example: When run: the program asks user for entering name and his symbol ('x' or '0') and then keep accepting inputs of position.
Do i create a @Before method and write input statements inside this method? or is there a better way to do this? Writing everything in my @Before method will make it extremely big.
Any suggestions?? Please help.
Thank you