public void DateTimeTest() { var tsp = new TypeSignaturePart("test", TypeCode.DateTime); var result = false; var positiveStringTest = new Parameter { Value = "01/01/15" }; result = tsp.CanParse(positiveStringTest); Assert.IsTrue(result); var negativeStringTest = new Parameter { Value = "x" }; result = tsp.CanParse(negativeStringTest); Assert.IsFalse(result); }
public void IntegerTest() { var tsp = new TypeSignaturePart("test", TypeCode.Int32); var result = false; var positiveStringTest = new Parameter { Value = "1234" }; result = tsp.CanParse(positiveStringTest); Assert.IsTrue(result); var negativeStringTest = new Parameter { Value = "x" }; result = tsp.CanParse(negativeStringTest); Assert.IsFalse(result); }