コード例 #1
0
        public void HasInputTest()
        {
            //test 1: invalid, input is null
            Assert.AreEqual(false, ValidationMethods.HasInput(null));

            //test 2: invalid, input is nothing
            Assert.AreEqual(false, ValidationMethods.HasInput(""));

            //test 3: invalid, input is nothing but spaces
            Assert.AreEqual(false, ValidationMethods.HasInput("   "));

            //test 4: valid, input is a valid string input
            Assert.AreEqual(true, ValidationMethods.HasInput("Hello, World!"));
        }