Ejemplo n.º 1
0
            public void Should_Remove_Client_Record_FromDb()
            {
                // Arrange
                string        pathToFile = @"С:\Users\Dakosia\source\repos\CSharp\KazTourApp\KazTourApp.DAL\LiteDb.db";
                int           id         = 0;
                ClientStorage storage    = new ClientStorage();
                int           itemsCountBeforeDeletion = storage.ReadAllClients().Count;

                // Act
                storage.RemoveClient(id);

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

                int itemsCountAfterDeletion = storage.ReadAllClients().Count;

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