void Test(string input, List <string> array)
        {
            var result = FieldsParserTask.ParseLine(input);

            CollectionAssert.AreEqual(result, array);
            //Assert.AreEqual(result, array);
        }
Exemplo n.º 2
0
        public void oneField()
        {
            //Arrange:
            var inputLine = "hello";
            //Act:
            var result = FieldsParserTask.ParseLine(inputLine);

            //Assert:
            Assert.AreEqual(new[] { "hello" }, result);
        }
        public void TestParseLine(string input, string[] expectedOutput)
        {
            var result = FieldsParserTask.ParseLine(input).ToArray();

            Assert.AreEqual(expectedOutput.Length, result.Length);

            if (result.Length == 0)
            {
                return;
            }

            for (var i = 0; i < result.Length; ++i)
            {
                Assert.AreEqual(expectedOutput[i], result[i]);
            }
        }
Exemplo n.º 4
0
        //void TestParseLine(string inputLine, List<string> expectedResult)
        void TestParseLine(string inputLine, List <string> expectedResult)
        {
            List <string> result = FieldsParserTask.ParseLine(inputLine);

            Assert.AreEqual(expectedResult, result);
        }