Exemplo n.º 1
0
        public void TestDataTypes()
        {
            //---------------Set up test pack-------------------
            const string myString = "Hello World";
            const int    myInt    = 9;
            //---------------Execute Test ----------------------
            bool result1     = ValidationUtil.CompareTypes(myString, ValidationDataType.String);
            bool result2     = ValidationUtil.CompareTypes(Convert.ToString(myInt), ValidationDataType.String);
            bool falseResult = ValidationUtil.CompareTypes(myString, ValidationDataType.Integer);

            //---------------Test Result -----------------------
            Assert.IsTrue(result1);
            Assert.IsTrue(result2);
            Assert.IsFalse(falseResult);
        }