private void RentaCrear_Load(object sender, EventArgs e) { cbRentaVehiculo.DataSource = _vehiculoService.GetAll(); cbRentaVehiculo.DisplayMember = "Descripcion"; cbRentaVehiculo.ValueMember = "Id"; cbRentaCliente.DataSource = _clienteService.GetAvalible(); cbRentaCliente.DisplayMember = "Nombre"; cbRentaCliente.ValueMember = "Id"; cbRentaCliente.SelectedIndex = 0; cbEstatusRenta.DataSource = _estatusRentaService.GetAll(); cbEstatusRenta.DisplayMember = "Descripcion"; cbEstatusRenta.ValueMember = "Id"; }
private void Inspeccionar_Load(object sender, EventArgs e) { cbInspecCliente.DataSource = _clienteService.GetAvalible(); cbInspecCliente.DisplayMember = "Nombre"; cbInspecCliente.ValueMember = "Id"; cbInspecCliente.SelectedIndex = 0; cbInspecVehiculo.DataSource = _vehiculoService.GetAll(); cbInspecVehiculo.DisplayMember = "Descripcion"; cbInspecVehiculo.ValueMember = "Id"; //cbInspecVehiculo.SelectedIndex = 0; }
public void GetAllVehiculo_True() { List <Vehiculo> auxList = new List <Vehiculo>(); Vehiculo veh = new Vehiculo(); auxList.Add(veh); IEnumerable <Vehiculo> vehiculos = auxList; var mockVehiculoRepository = new Mock <IVehiculoRepository>(); mockVehiculoRepository.Setup(sp => sp.GetAll()).Returns(vehiculos); IVehiculoService vehiculoService = new VehiculoService(mockVehiculoRepository.Object); var resultado = vehiculoService.GetAll(); Assert.NotEmpty(resultado); }