Ejemplo n.º 1
0
        public void TestValidateShortString()
        {
            Assert.True(GAValidator.ValidateShortString(GATestUtilities.GetRandomString(32), false));
            Assert.True(GAValidator.ValidateShortString(GATestUtilities.GetRandomString(32), true));
            Assert.True(GAValidator.ValidateShortString(GATestUtilities.GetRandomString(10), false));
            Assert.True(GAValidator.ValidateShortString(GATestUtilities.GetRandomString(10), true));
            Assert.True(GAValidator.ValidateShortString(null, true));
            Assert.True(GAValidator.ValidateShortString("", true));

            Assert.False(GAValidator.ValidateShortString(GATestUtilities.GetRandomString(40), false));
            Assert.False(GAValidator.ValidateShortString(GATestUtilities.GetRandomString(40), true));
            Assert.False(GAValidator.ValidateShortString(null, false));
            Assert.False(GAValidator.ValidateShortString("", false));
        }