Exemplo n.º 1
0
        public void FormatAsShortString_Should_Return_Expected_Fields()
        {
            var bookStringFormatter = new BookStringFormatter();
            var str = bookStringFormatter.FormatAsShortString(book);

            StringAssert.Contains(".NET For Smarties", str);
            StringAssert.Contains("Authors: Henry Isaac Rowntree, Joseph Rowntree", str);
            StringAssert.Contains("Publisher: Nestlé", str);
            StringAssert.Contains("Publish Date: 1862", str);
        }
Exemplo n.º 2
0
        public void FormatAsString_Should_Return_Expected_Fields()
        {
            var bookStringFormatter = new BookStringFormatter();
            var str = bookStringFormatter.FormatAsString(book);

            StringAssert.Contains(".NET For Smarties", str);
            StringAssert.Contains("Authors: Henry Isaac Rowntree, Joseph Rowntree", str);
            StringAssert.Contains("Publisher: Nestlé", str);
            StringAssert.Contains("Description: A book for candies.", str);
            StringAssert.Contains("Page Count: 1", str);
            StringAssert.Contains("Publish Date: 1862", str);
            StringAssert.Contains("Categories: Candy, Computer Programming", str);
        }