Beispiel #1
0
        public string ToStringTest1()
        {
            var book = new Book("978-0743273565", "F. Scott Fitzgerald", "The Great Gatsby", "Scribner", 1925, 180, 9.92);

            return(book.ToString("AT"));
        }
Beispiel #2
0
        public string ToStringTest3()
        {
            var book = new Book("978-1451673319", "Ray Bradbury", "Fahrenheit 451", "Simon & Schuster", 1953, 249, 8.29);

            return(book.ToString("IAT"));
        }
Beispiel #3
0
        public string ToStringTest2()
        {
            var book = new Book("978-0060935467", "Harper Lee", "To Kill a Mockingbird", "Harper Perennial", 1960, 336, 7.19);

            return(book.ToString("F"));
        }
Beispiel #4
0
        public void ToStringBookTest()
        {
            var book = new Book("LoR", "Tolkien", 1954, "isbn", Category.Fantasy);

            Assert.Equal("title: LoR author: Tolkien year: 1954 ISBN: isbn category: Fantasy", book.ToString());
        }
Beispiel #5
0
 public void StringBookRepresentationTest(StringFormEnum form, string expected)
 {
     Assert.AreEqual(expected, book.ToString(form));
 }
 public string FormatTest(string format)
 {
     return(book.ToString(format));
 }