Exemplo n.º 1
0
        public void Can_load_another_book_with_correct_title()
        {
            // ARRANGE
            var bookId = "95aedbbc-e385-4762-b513-5b579cd0ac64";
            var sut    = new BookRepositoryMySql(_connectionString);

            // ACT
            var result = sut.GetById(bookId);

            // ASSERT
            Assert.AreEqual("Breakfast of Champions", result.Title);
        }
Exemplo n.º 2
0
        public void Can_load_book_with_correct_title()
        {
            // ARRANGE
            var bookId = "409b0915-b494-4993-9211-a533fb78f70d";
            var sut    = new BookRepositoryMySql(_connectionString);

            // ACT
            var result = sut.GetById(bookId);

            // ASSERT
            Assert.AreEqual("Clean Code", result.Title);
        }
Exemplo n.º 3
0
        public void Can_load_another_book_from_mysql_database()
        {
            // ARRANGE
            var bookId = "95aedbbc-e385-4762-b513-5b579cd0ac64";
            var sut    = new BookRepositoryMySql(_connectionString);

            // ACT
            var result = sut.GetById(bookId);

            // ASSERT
            Assert.IsNotNull(result, "Book is null");
        }
Exemplo n.º 4
0
        public void Can_load_book_from_mysql_database()
        {
            // ARRANGE
            var bookId = "409b0915-b494-4993-9211-a533fb78f70d"; // From https://www.guidgenerator.com/online-guid-generator.aspx
            var sut    = new BookRepositoryMySql(_connectionString);

            // ACT
            var result = sut.GetById(bookId);

            // ASSERT
            Assert.IsNotNull(result, "Book is null");
        }