Ejemplo n.º 1
0
        public void Should_return_the_right_number_in_the_specified_file(string filePath, string expected)
        {
            var spiffyMachineOutput = File.ReadAllText(filePath);
            var spiffyDecoder       = new LinesReader();
            var actual = spiffyDecoder.GetCorrespondingNumberFromASCII(spiffyMachineOutput);

            Check.That(actual.ReadNumbers[0]).IsEqualTo(expected);
        }
Ejemplo n.º 2
0
        public List <string> Scan(string[] fileContent)
        {
            var result      = new List <string>();
            var readNumbers = new LinesReader().ReadLines(fileContent);

            foreach (List <SpiffyNumber> spiffyNumbers in readNumbers)
            {
                var accountOuput = SpiffyNumberConverter.Convert(spiffyNumbers);
                result.Add(accountOuput);
            }
            return(result);
        }