public string HandleTextInsideUnderscore(string str) { var reader = new StringReader(str); var emphasisHandler = new EmphasisHandler(); return(emphasisHandler.HandleSubstring(reader)); }
public void ThrowsInvalidOperation_IfTryHandleWithNotUnderscore() { var reader = new StringReader("abc"); var emphasisHandler = new EmphasisHandler(); Action tryReadFromNotUnderscore = () => emphasisHandler.HandleSubstring(reader); tryReadFromNotUnderscore.ShouldThrow <InvalidOperationException>(); }