public void Debe_ObtenerEmpleados_RetornarEmpleado_CuandoFiltraPorIdEmpleado()
        {
            Empleado empleado = _empleadoServicio.ObtenerEmpleado(2);

            Assert.IsTrue(new Dinero(100_000m, Moneda.COP) == empleado.SalarioDiario);
            Assert.IsTrue(new Dinero(100_000m, Moneda.COP) == empleado.SalarioDiarioPorPorcentajeSalario);
            Assert.IsTrue(new Dinero(0m, Moneda.COP) == empleado.SalarioDiarioPorPorcentajeCompensacion);
        }
Ejemplo n.º 2
0
 private void listBox1_Click(object sender, EventArgs e)
 {
     try
     {
         if (listBox1.SelectedItem != null)
         {
             Empleado empl = _empls.ObtenerEmpleado(ObtenerIdEmpleado());
             textBox1.Text           = empl.Nombre;
             textBox5.Text           = empl.Apellido;
             textBox6.Text           = empl.Cuil.ToString();
             textBox10.Text          = empl.FechaNacimiento.ToString("dd/MM/yyyy");
             comboBox2.SelectedIndex = comboBox2.FindString(ObtenerCategoria(empl));
             button2.Enabled         = true;
             button4.Enabled         = true;
             button3.Enabled         = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Debe seleccionar un empleado de la lista.\nAseguresé de que existan empleados dados de alta.");
     }
 }