Exemplo n.º 1
0
 private void TryParseInvalid(string parseString)
 {
     try
     {
         PlaceholderParser.ParsePlaceholder(parseString);
         Assert.Fail();
     }
     catch (PlaceholderParseException)
     {
         // expected
     }
 }
Exemplo n.º 2
0
        public void TestParseValid(object[] inputAndResults)
        {
            var parseString = (string)inputAndResults[0];
            var expected    = (object[])inputAndResults[1];

            var result = PlaceholderParser.ParsePlaceholder(parseString);

            Assert.AreEqual(expected.Length, result.Count, "Incorrect count for '" + parseString + "'");
            for (var i = 0; i < expected.Length; i++)
            {
                Assert.AreEqual(expected[i], result[i], "Incorrect value for '" + parseString + "' at " + i);
            }
        }