private void UpdateParsedText() { parsedTextBox.Text = title + Environment.NewLine + Environment.NewLine + string.Join(Environment.NewLine, FieldsParserTask.ParseLine(textBox.Text)); }
public static void Test(string input, string[] expectedResult) { var actualResult = FieldsParserTask.ParseLine(input); Assert.AreEqual(expectedResult.Length, actualResult.Count); for (int i = 0; i < expectedResult.Length; ++i) { Assert.AreEqual(expectedResult[i], actualResult[i].Value); } }
public static void ChekTokens(string line, string[] expectedValue, int[] expectedStartIndex, int[] expectedStartLength) { var actualResult = FieldsParserTask.ParseLine(line); Assert.AreEqual(expectedValue.Length, actualResult.Count); for (int i = 0; i < expectedValue.Length; ++i) { Assert.AreEqual(expectedValue[i], actualResult[i].Value); Assert.AreEqual(expectedStartIndex[i], actualResult[i].Position); Assert.AreEqual(expectedStartLength[i], actualResult[i].Length); } }
void ParserTest(string stringToParse, string[] expectedResult) { var resultOfParse = FieldsParserTask.ParseLine(stringToParse); Assert.AreEqual(expectedResult, resultOfParse.ToArray()); }