Exemplo n.º 1
0
        public void GetResultMessages_EmptyMessageList_ProducesMessages()
        {
            List <string> messages        = new List <string>();
            Message       sarifMessage    = ResultsFileSarifMapper.GetResultMessages(messages);
            string        returnedMessage = sarifMessage.Text.Trim();

            Assert.IsTrue(string.IsNullOrEmpty(returnedMessage));
        }
Exemplo n.º 2
0
        public void GetResultMessages_ReceivesNormalParameters_ProducesMessages()
        {
            List <string> messages     = new List <string>();
            string        messageOne   = "one";
            string        messageTwo   = "two";
            string        messageThree = "three";

            messages.Add(messageOne);
            messages.Add(messageTwo);
            messages.Add(messageThree);

            string  expectedMessage = messageOne + " " + messageTwo + " " + messageThree;
            Message sarifMessage    = ResultsFileSarifMapper.GetResultMessages(messages);

            Assert.AreEqual(expectedMessage, sarifMessage.Text.Trim());
        }
Exemplo n.º 3
0
        public void GetResultMessages_NullMessages_ProducesMessages()
        {
            Message sarifMessage = ResultsFileSarifMapper.GetResultMessages(null);

            Assert.IsTrue(string.IsNullOrEmpty(sarifMessage.Text));
        }