예제 #1
0
        public void EncodeNonSeparatorCharacters_Throws_IfInvalidInput(string input, char quote, int offset)
        {
            // Act
            ArgumentException ex = Assert.Throws <ArgumentException>(() => SlackCommand.EncodeNonSeparatorCharacters(input));

            // Assert
            Assert.Equal(string.Format(CultureInfo.CurrentCulture, "Unmatched quote ({0}) discovered at position {1}.", quote, offset), ex.Message);
        }
예제 #2
0
        public void EncodeNonSeparatorCharacters_ParsesCorrectInput(string input, string expected)
        {
            // Act
            string actual = SlackCommand.EncodeNonSeparatorCharacters(input);

            // Assert
            Assert.Equal(expected, actual);
        }