Ejemplo n.º 1
0
        public void ShouldUseConditionalTags()
        {
            // arrange
            var    sut   = new ReadmeService();
            string input = LoadReadme();

            // act
            var result = sut.MdToXaml("http://example.com", input);

            Console.WriteLine(result);

            // assert
            Assert.IsTrue(result.Contains("this text will be included in GitHub and HunterPie"));
            Assert.IsTrue(result.Contains("this text will be included only in HunterPie"));
            Assert.IsFalse(result.Contains("this text will be included only in GitHub"));
        }
Ejemplo n.º 2
0
        public void ShouldReplaceImageLinksWithAbsoluteLink()
        {
            // arrange
            var sut   = new ReadmeService();
            var input = LoadReadme();

            // act
            var result = sut.MdToXaml("http://example.com/t", input);

            Console.WriteLine(result);

            // assert
            Assert.IsTrue(result.Contains("https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png"));
            Assert.IsTrue(result.Contains("http://example.com/t/relative1.png"));
            Assert.IsTrue(result.Contains("http://example.com/t/relative2.png"));
            Assert.IsTrue(result.Contains("http://example.com/t/relative3.png"));
        }