Пример #1
0
        public void TrySetClientID_onlyNumbers()
        {
            string TestString = null;
            bool   state      = OrderValidator.TrySetClientID("123456", out TestString);

            Assert.IsTrue(state);
            Assert.AreEqual(TestString, "123456");
        }
Пример #2
0
        public void TrySetClientID_emptyString()
        {
            string TestString = null;
            bool   state      = OrderValidator.TrySetClientID("", out TestString);

            Assert.IsFalse(state);
            Assert.AreEqual(TestString, "");
        }
Пример #3
0
        public void TrySetClientID_invalidCharacter()
        {
            string TestString = null;
            bool   state      = OrderValidator.TrySetClientID("abc-de", out TestString);

            Assert.IsFalse(state);
            Assert.AreEqual(TestString, "");
        }
Пример #4
0
        public void TrySetClientID_checkSpace()
        {
            string TestString = null;
            bool   state      = OrderValidator.TrySetClientID("123a o", out TestString);

            Assert.IsFalse(state);
            Assert.AreEqual(TestString, "");
        }
Пример #5
0
        public void TrySetClientID_lettersAndNumbersTooLong()
        {
            string TestString = null;
            bool   state      = OrderValidator.TrySetClientID("123abc4", out TestString);

            Assert.IsFalse(state);
            Assert.AreEqual(TestString, "");
        }
Пример #6
0
        public void TrySetClientID_onlyLetters()
        {
            string TestString = null;
            bool   state      = OrderValidator.TrySetClientID("abcdef", out TestString);

            Assert.IsTrue(state);
            Assert.AreEqual(TestString, "abcdef");
        }