Exemplo n.º 1
0
        public void Should_Pass_If_Fails_To_Deleted_Non_Existing_Vehicle_Successfully()
        {
            _DataBaseContainer(db =>
            {
                // Arrange
                VehicleOperations vo = GetVehicleOperationsWithData(db, TestVehicles);

                // Act
                var result = vo.DeleteVehicle(TestVehicles.Count * 2);

                // Assert
                Assert.False(result);
            });
        }
Exemplo n.º 2
0
        public void Should_Pass_If_Vehicle_Is_Deleted_Successfully()
        {
            _DataBaseContainer(db =>
            {
                // Arrange
                VehicleOperations vo = GetVehicleOperationsWithData(db, TestVehicles);

                // Act
                var result = vo.DeleteVehicle(1);

                // Assert
                Assert.True(result);

                Assert.Null(db.GetCollection <IVehicle>().Find(v => v.Id == 1).FirstOrDefault());
            });
        }