public UnitTests()
        {
            // we will supply a new service provider for each context,
            // that will enable us to have a single database instance per test.
            var serviceProvider = new ServiceCollection()
                                  .AddEntityFrameworkInMemoryDatabase()
                                  .BuildServiceProvider();

            // Build context options
            var builder = new DbContextOptionsBuilder <customerDatabaseContext>()
                          .UseInMemoryDatabase("customerDatabase")
                          .UseInternalServiceProvider(serviceProvider);

            _context = new customerDatabaseContext(builder.Options);
            _context.CustomerTrucks.AddRange(
                Enumerable.Range(1, 10)
                .Select(t => new CustomerTrucks
            {
                VehicleId           = "vehicleID" + t,
                CustomerCompanyName = "customerCompanyName" + t,
                Adress = "adressssss" + t,
                RegNr  = "RegNR" + t,
                TruckConnectionStatus = "iThinkItsConnected" + t
            })
                );

            _context.SaveChanges();
        }
        public void getAllTrucksAndUpdateTruckStatus()
        {
            using (_context)
            {
                foreach (var truck in _context.CustomerTrucks)
                {
                    string truckConnectionStatus = pingTruck(truck.VehicleId);
                    updateTruckStatus(truck, truckConnectionStatus);
                }

                _context.SaveChanges();
            }
        }