예제 #1
0
        public void IsAValidDataType_StringifiedText_ReturnFalse()
        {
            IntType intType = TestIntType.CreateIntType();
            string  text    = "iyg";

            Assert.IsFalse(int.TryParse(text, out int parsedNumber));
            Assert.IsFalse(intType.IsAValidDataType(text));
        }
예제 #2
0
        public void IsAValidDataType_StringifiedDouble_ReturnFalse()
        {
            IntType intType    = TestIntType.CreateIntType();
            string  textDouble = "6.8";

            Assert.IsFalse(int.TryParse(textDouble, out int parsedNumber));
            Assert.IsFalse(intType.IsAValidDataType(textDouble));
        }
예제 #3
0
        public void IsAValidDataType_StringifiedInt_ReturnTrue()
        {
            IntType intType    = TestIntType.CreateIntType();
            string  textNumber = "6";

            //Verify that the data for the test is well (because sometimes people could be so stupid that they do a test with fails)
            Assert.IsTrue(int.TryParse(textNumber, out int parsedNumber));
            Assert.IsTrue(intType.IsAValidDataType(textNumber));
        }