Ejemplo n.º 1
0
        public void Edit()
        {
            // Arrange
            var             db         = new FakeLibraryDb();
            BooksController controller = new BooksController(db);

            // Act
            //controller.Edit(book);

            // Assert
            //Assert.AreEqual("Prosta biblioteka do wykorzystania w domu.", result.ViewBag.Message);
        }
Ejemplo n.º 2
0
        public void Create_SavesBook_Valid()
        {
            // Arrange

            var             db         = new FakeLibraryDb();
            BooksController controller = new BooksController(db);

            controller.ControllerContext = new FakeControllerContext();

            // Act
            Book book = new Book();

            book.Id     = 1;
            book.Title  = "Atuty zguby";
            book.Author = "Zelazny, Roger";
            book.Isbn   = "6814681651";
            book.Rate   = 5;
            controller.Create(book);

            Assert.AreEqual(true, true);
        }