示例#1
0
        public string HandleTextInsideUnderscore(string str)
        {
            var reader          = new StringReader(str);
            var emphasisHandler = new EmphasisHandler();

            return(emphasisHandler.HandleSubstring(reader));
        }
示例#2
0
        public void ThrowsInvalidOperation_IfTryHandleWithNotUnderscore()
        {
            var reader          = new StringReader("abc");
            var emphasisHandler = new EmphasisHandler();

            Action tryReadFromNotUnderscore = () => emphasisHandler.HandleSubstring(reader);

            tryReadFromNotUnderscore.ShouldThrow <InvalidOperationException>();
        }