Esempio n. 1
0
        public void SerialCodeValid()
        {
            var validator = new SerialCodeValidator(_database);
            var errors    = validator.Validate(new NodeModel("", "1234567891", ""));

            Assert.AreEqual(0, errors.Count);
        }
Esempio n. 2
0
        public void SerialCodeTooLong()
        {
            var validator = new SerialCodeValidator(_database);
            var errors    = validator.Validate(new NodeModel("", "12345678910", ""));

            Assert.AreEqual(1, errors.Count);
            Assert.AreEqual("SerialCode not valid!", errors[0]);
        }
Esempio n. 3
0
        public void SerialCodeNotBlanks()
        {
            var validator = new SerialCodeValidator(_database);
            var errors    = validator.Validate(new NodeModel("", "      ", ""));

            Assert.AreEqual(1, errors.Count);
            Assert.AreEqual("SerialCode not valid!", errors[0]);
        }