Ejemplo n.º 1
0
        public void Builder_Should_ReturnRssFeed()
        {
            // Arrange
            INewsBuilder builder = new RssNewsBuilder();
            var newsDirector = new NewsDirector();

            // Act
            var result = newsDirector.Construct(builder,
                "TSTune Design Pattern released",
                "Visit the blog http://tstune.blogspot.com for more details about the Design Pattern examples.");

            // Assert
            Assert.IsTrue(result.Contains("<rss"));
        }
Ejemplo n.º 2
0
        public void Builder_Should_ReturnHtmlPage()
        {
            // Arrange
            INewsBuilder builder = new HtmlNewsBuilder();
            var newsDirector = new NewsDirector();

            // Act
            var result = newsDirector.Construct(builder,
                "TSTune Design Pattern released",
                "Visit the blog http://tstune.blogspot.com for more details about the Design Pattern examples.");

            // Assert
            Assert.IsTrue(result.StartsWith("<!DOCTYPE"));
        }