예제 #1
0
        public void Test_Symbols_Must_Be_Two_Letters()
        {
            IElementValidator validator = new ElementValidator();

            var errorMessages = new List <string>();

            validator.ValidateNumLetters(errorMessages, _elements.FirstOrDefault());

            Assert.IsTrue(errorMessages.FirstOrDefault() == ConstantStrings.ALL_CHEM_SYMB_2_LETTERS);
        }
예제 #2
0
        public void Test_Proper_Symbol_Syntax_Passes()
        {
            IElementValidator validator = new ElementValidator();

            var errorMessages = new List <string>();

            validator.ValidateNumLetters(errorMessages, _elements[1]);

            Assert.IsTrue(errorMessages.FirstOrDefault() == null);
        }