public void GetParameterModeTest() { var testData = new List <Tuple <int, int, int> >(new Tuple <int, int, int>[] { new Tuple <int, int, int>(1002, 1, 0), new Tuple <int, int, int>(1002, 2, 1), new Tuple <int, int, int>(1002, 3, 0), new Tuple <int, int, int>(200146, 1, 1), new Tuple <int, int, int>(200146, 2, 0), new Tuple <int, int, int>(200146, 3, 0), new Tuple <int, int, int>(200146, 4, 2), new Tuple <int, int, int>(200146, 5, 0), }); foreach (var testExample in testData) { var parsedCommand = IntcodeComputer.ParseCommand(testExample.Item1); var result = IntcodeComputer.GetParameterMode(testExample.Item2, parsedCommand); Assert.Equal(testExample.Item3, result); } }