Ejemplo n.º 1
0
        public void TestValidateEventPartLength()
        {
            Assert.True(GAValidator.ValidateEventPartLength(GATestUtilities.GetRandomString(40), true));
            Assert.True(GAValidator.ValidateEventPartLength(GATestUtilities.GetRandomString(40), false));
            Assert.False(GAValidator.ValidateEventPartLength(GATestUtilities.GetRandomString(80), true));
            Assert.False(GAValidator.ValidateEventPartLength(GATestUtilities.GetRandomString(80), false));
            Assert.False(GAValidator.ValidateEventPartLength(null, false));
            Assert.False(GAValidator.ValidateEventPartLength("", false));
            Assert.True(GAValidator.ValidateEventPartLength("", true));

            Assert.True(GAValidator.ValidateEventPartLength("sdfdf", false));
            Assert.True(GAValidator.ValidateEventPartLength(null, true));
            Assert.True(GAValidator.ValidateEventPartLength(GATestUtilities.GetRandomString(32), true));
        }