/// <summary> /// Gets the get fizz buzz formatted string test data. /// </summary> /// <returns>The get fizz buzz formatted string test data.</returns> private IEnumerable<GetFizzBuzzFormattedStringTestData> GetGetFizzBuzzFormattedStringTestData() { using (var csv = new CsvReader(@"..\..\TestData\DataForGetFizzBuzzFormattedString.csv")) { while (csv.Next()) { var result = new GetFizzBuzzFormattedStringTestData { Value = int.Parse(csv[0]), ExpectedResult = csv[1].Trim() }; yield return result; } } }
/// <summary> /// Gets the is value multiple from divider test data. /// </summary> /// <returns>The is value multiple from divider test data.</returns> private IEnumerable<IsValueMultipleFromDividerTestData> GetIsValueMultipleFromDividerTestData() { using (var csv = new CsvReader(@"..\..\TestData\DataForIsMultipleFromDivider.csv")) { while (csv.Next()) { var result = new IsValueMultipleFromDividerTestData { Value = int.Parse(csv[0]), Divider = int.Parse(csv[1]), ExpectedResult = bool.Parse(csv[2]) }; yield return result; } } }
/// <summary> /// Gets the value contains digit test data. /// </summary> /// <returns>The value contains digit test data.</returns> private IEnumerable<ValueContainsDigitTestData> GetValueContainsDigitTestData() { using (var csv = new CsvReader(@"..\..\TestData\DataForValueContainsDigit.csv")) { while (csv.Next()) { var result = new ValueContainsDigitTestData { Value = int.Parse(csv[0]), Digit = int.Parse(csv[1]), ExpectedResult = bool.Parse(csv[2]) }; yield return result; } } }