public async Task EditShouldEdit()
        {
            var options           = new DbContextOptionsBuilder <ApplicationDbContext>().UseInMemoryDatabase("Edit").Options;
            var dbContext         = new ApplicationDbContext(options);
            var imageService      = new ImageService(dbContext);
            var motorcycleService = new MotorcycleService(dbContext, imageService);

            AutoMapperConfig.RegisterMappings(typeof(EditMotorcycleViewModel).Assembly, typeof(Motorcycle).Assembly);

            var addModel = new AddMotorcycleViewModel()
            {
                Type         = MotorcycleType.Cross,
                Made         = "Honda",
                Transmission = TransmissionType.Automatic,
                PriceForHour = 2.00M,
                Description  = "Test",
            };

            var addedScooter = await motorcycleService.AddVehicle <AddMotorcycleViewModel>(addModel);

            var editModel = new EditMotorcycleViewModel()
            {
                Type         = MotorcycleType.Cross,
                Made         = "Edited",
                Transmission = TransmissionType.Automatic,
                PriceForHour = 2.00M,
                Description  = "Test",
            };

            await motorcycleService.DoEdit <EditMotorcycleViewModel>(editModel);

            var editedModel = motorcycleService.EditDetails <EditMotorcycleViewModel>(addedScooter);

            Assert.Equal("Edited", editModel.Made);
        }
        public async Task AddImage()
        {
            var options           = new DbContextOptionsBuilder <ApplicationDbContext>().UseInMemoryDatabase("add_image").Options;
            var dbContext         = new ApplicationDbContext(options);
            var imageService      = new ImageService(dbContext);
            var motorcycleService = new MotorcycleService(dbContext, imageService);

            AutoMapperConfig.RegisterMappings(typeof(MotorcycleViewModel).Assembly, typeof(Motorcycle).Assembly);
            AutoMapperConfig.RegisterMappings(typeof(EditMotorcycleViewModel).Assembly, typeof(Motorcycle).Assembly);

            var scooter1 = new AddMotorcycleViewModel()
            {
                Type         = MotorcycleType.Cross,
                Made         = "Honda",
                Transmission = TransmissionType.Automatic,
                PriceForHour = 2.00M,
                Description  = "Test",
            };

            var imagePath = "Test";
            var scooter   = await motorcycleService.AddVehicle <AddMotorcycleViewModel>(scooter1);

            await motorcycleService.AddImageUrls(scooter, imagePath);

            var result = motorcycleService.EditDetails <MotorcycleViewModel>(scooter);

            Assert.Equal(imagePath, result.ImageUrl);
        }