public async void GetByManufacturerIdValid() { var vehicle = EntitiesFactory.GetNewVehicle(); List <Vehicle> listReturn = EntitiesFactory.GetVehicleList(); _vehicleRepository.GetByManufacturerId(vehicle.ManufacturerId).Returns(listReturn); IEnumerable <Vehicle> result = await _vehicleService.GetByManufacturerId(vehicle.ManufacturerId); result.Should().NotBeNull(); }
public async void GetByIdsValid() { List <Vehicle> listReturn = EntitiesFactory.GetVehicleList(); string[] ids = EntitiesFactory.GetArrayStringIds(); _vehicleRepository.GetByIds(ids).Returns(listReturn); IEnumerable <Vehicle> result = await _vehicleService.GetByIds(ids); result.Should().NotBeNull(); }
public async void ImportInvalid(string id, string companyId, string name, string manufacturerId) { List <Vehicle> vehicleList = EntitiesFactory.GetVehicleList(); var vehicle = EntitiesFactory.GetNewVehicleParametrized(id, name, companyId, manufacturerId); vehicleList.Add(vehicle); _vehicleRepository.Import(vehicleList).Returns(true); bool result = await _vehicleService.Import(vehicleList); result.Should().BeFalse(); }