public void TestGetRules()
        {
            Dictionary <string, string> rules = MessageValidator.GetRules(this.testData);

            Assert.AreEqual(6, rules.Keys.Count);
            Assert.AreEqual("b", rules["5"]);
        }
        public void TestGetMessages()
        {
            List <string> messages = MessageValidator.GetMessages(this.testData);

            Assert.AreEqual(5, messages.Count);
            Assert.AreEqual("aaaabbb", messages[4]);
        }
        public void TestValidate(int iMessage, bool expectedValid)
        {
            List <string> messages            = MessageValidator.GetMessages(this.testData);
            Dictionary <string, string> rules = MessageValidator.GetRules(this.testData);
            bool valid = MessageValidator.Validate(messages[iMessage], rules);

            Assert.AreEqual(expectedValid, valid);
        }
        public void TestGetValidMessages()
        {
            Dictionary <string, string> rules = MessageValidator.GetRules(this.testData);
            string        validMessagePath    = TestMessageValidator.DayPath + "TestValidMessages.txt";
            List <string> validMessages       = MessageValidator.ReadFileAsArray(validMessagePath).ToList();

            List <string> messages = MessageValidator.GetValidMessages(rules);

            Assert.AreEqual(validMessages.Count, messages.Count);
            Assert.AreEqual(validMessages, messages);
        }
 public void Setup()
 {
     this.testData  = MessageValidator.ReadFileAsArray(FilePathTestData);
     this.inputData = MessageValidator.ReadFileAsArray(FilePathInputData);
 }