예제 #1
0
        public void Init_CreateObject_IsNotNull(Int32 markdownType)
        {
            var parserPoolStub  = Substitute.For <IParserPool>();
            var environmentStub = Substitute.For <IEnvironment>();

            var obj = new ExceptionMarkdownNodeParser(parserPoolStub, environmentStub, (MarkdownType)markdownType);

            Assert.IsNotNull(obj);
        }
예제 #2
0
        public void Parse_ParseInputElement_ResultEqualsExpected(Int32 markdownType, String expected)
        {
            var input           = this.XmlInput;
            var parserPoolStub  = Substitute.For <IParserPool>();
            var environmentMock = Substitute.For <IEnvironment>();

            environmentMock.NewLine.Returns(Environment.NewLine);

            var parser = new ExceptionMarkdownNodeParser(parserPoolStub, environmentMock, (MarkdownType)markdownType);

            var result = parser.ParseToMarkdown(input);

            StringAssert.AreEqualIgnoringCase(expected, result);
        }