SeanKilleen/seankilleen.github.io

C# Advent calendar post: Ensuring Santa's Success With Automated Testing

Closed this issue · 0 comments

(A take on the "mars rover" kata, to introduce automated testing). Examples in NUnit, xUnit, and SpecFlow.)

General idea: a grid of airspace (x,y coords) that Santa flies over to drop presents from.

  • We need a SantaSleigh
  • It has an on-board navigation system that tells him whether he's over a house.
  • North, East, South, and West
  • Sleigh can turn right or left
  • Can move forward or backward by x amount
  • The world wraps around

Steps (stopping points of multiple tests)

  • Sleigh starts at 0,0, starts facing North
  • Turn left (1-5 times)
  • Turn right (1-5 times)
  • Traveling East increases x / West decreases
  • Traveling North increases y / South decreases
  • Wrap around on different size boards (property-based testing)