public async Task GetVehicle_ByVehicleId_ReturnStatusCodeOK()
        {
            // Arrange
            var vehicleId = 1;

            var vehicleResponse = new VehicleResponse
            {
                Id          = Guid.NewGuid(),
                VehicleId   = 1,
                Number      = "A-001",
                Model       = "Honda City",
                Description = "Blue Color"
            };

            vehiclesService.GetVehicleAsync(vehicleId).Returns(Task.FromResult(vehicleResponse));

            // Act
            var actionResult = await vehiclesController.GetVehicleById(vehicleId);

            var objectResult = actionResult as OkObjectResult;

            // Assert
            var response = objectResult.Value as VehicleResponse;

            Assert.NotNull(objectResult);
            Assert.Equal(vehicleId, response.VehicleId);
            Assert.Equal((int)System.Net.HttpStatusCode.OK, objectResult.StatusCode);
        }
        public async void VehiclesController_GetVehiclesById(ulong id)
        {
            try
            {
                var options = new DbContextOptionsBuilder <NMTFleetManagerContext>()
                              .UseSqlite(connection)
                              .Options;

                using (context = new NMTFleetManagerContext(options))
                {
                    context.Database.OpenConnection();
                    context.Database.EnsureCreated();
                }

                using (context = new NMTFleetManagerContext(options))
                {
                    SeedCollection seedCollection = SeedData.Seed();
                    context.Vehicles.AddRange(seedCollection.Vehicles);
                    context.SaveChanges();
                }

                using (context = new NMTFleetManagerContext(options))
                {
                    Vehicle expected = await context.Vehicles.FindAsync(id);

                    vehiclesController = new VehiclesController(context);
                    var actionResult = await vehiclesController.GetVehicleById(id);

                    if (expected == null)
                    {
                        Assert.IsType <NotFoundResult>(actionResult.Result);
                    }
                    else
                    {
                        var okResult = actionResult.Result as OkObjectResult;
                        var actual   = okResult?.Value as Vehicle;

                        Assert.Equal(expected, actual);
                    }
                }
            }
            finally
            {
                connection.Close();
            }
        }