Example #1
0
            public void Should_Remove_Book_Record_FromDb()
            {
                // Arrange
                string      pathToFile = @"ะก:\Users\Dakosia\source\repos\CSharp\KazTourApp\KazTourApp.DAL\LiteDb.db";
                int         id         = 0;
                BookStorage storage    = new BookStorage();
                int         itemsCountBeforeDeletion = storage.ReadAllBookings().Count;

                // Act
                storage.RemoveBooking(id);

                // Assert
                Assert.IsTrue(File.Exists(pathToFile));

                int itemsCountAfterDeletion = storage.ReadAllBookings().Count;

                Assert.IsTrue(itemsCountBeforeDeletion == itemsCountAfterDeletion + 1);
            }