This guide explains how to test the Toy Robot simulator using the provided test files and interactive mode. This has been written in C# .NET 8.0
Ideally download as a zip as the file structure will remain as planned.
Required to run: .NET 8.0 SDK installed - Choose the SDK (not just runtime or desktop)
Not 100% necessary as you can run dotnet run - Build Project (dotnet build)
Test Files Included
The project includes two test files in the root directory:
robot-test.txt - Basic functionality tests prodivded with the brief
robot-test2.txt - Comprehensive in-depth testing
Quick Test - Open a console window in the project folder (Toy_Robot)
dotnet run -- robot-test.txt
Comprehensive Test (In-Depth)
dotnet run -- robot-test2.txt
This is the expected outcome from running a test file:
Create your own test file and run it:
dotnet run -- "C:\Code\Toy Robot\Toy_Robot\myTests.txt"
Download the ToyRobotTest folder and place it in the same folder as the main project.
This is what the outcome of the test file is, though the first time it is run, it may show some warnings but will still finish:
Execute the automated test suite in the Toy_Robot folder (Important):
dotnet test
Y
4 [ ][ ][ ][ ][ ] ← NORTH edge
3 [ ][ ][ ][ ][ ]
2 [ ][ ][ ][ ][ ]
1 [ ][ ][ ][ ][ ]
0 [0][ ][ ][ ][4] ← SOUTH edge (Y=0)
0 1 2 3 4 - X
↑--------- ↑
WEST--- EAST
edge---- edge

