public void ErrorAlAgregarOrdenErronea() { ProcesoProductivoEmpleadosServicio proc = new ProcesoProductivoEmpleadosServicio(new List <Orden>() { new Orden((new List <Etapas>() { new Etapas(new Empleado() { Nombre = "lucas", Dni = 32638916, Id = 1 }, 2, "") }), new List <MateriasPrima>() { new MateriasPrima() { Nombre = "Pintura", Id = 1, Cantidad = 30, Costo = 1000 } }, DateTime.Now) }); List <String> listaErrores = new List <String>(); foreach (Orden orden in proc.ListOrdenes) { foreach (var item in orden.listEtapas) { var ex = Assert.Throws <ExcepcionesDeDominio>( () => new Nombre(item.Nombre)).Message.ToString(); } } }
public void SePuedeAgregarOrden() { ProcesoProductivoEmpleadosServicio ProcesoProductivo = new ProcesoProductivoEmpleadosServicio(new List <Orden>() { new Orden((new List <Etapas>() { new Etapas(new Empleado() { Nombre = "lucas", Dni = 32638916, Id = 1 }, 20, "Preparacion") }), new List <MateriasPrima>() { new MateriasPrima() { Nombre = "Pintura", Id = 1, Cantidad = 30, Costo = 1000 } }, DateTime.Now) }); bool opcion = ProcesoProductivo.SePuedeAgregarOrden(); Assert.True(opcion == true); }
public void CalcularDuracionEnHorasProceso() { ProcesoProductivoEmpleadosServicio proc = new ProcesoProductivoEmpleadosServicio( new List <Orden>() { new Orden((new List <Etapas>() { new Etapas( new Empleado() { Nombre = "lucas", Dni = 32638916, Id = 1 }, 2, "Proceso 1") }), new List <MateriasPrima>() { new MateriasPrima() { Nombre = "Pintura", Id = 1, Cantidad = 30, Costo = 1000 } }, DateTime.Now) }); decimal duracion = proc.CalcularDuracionProducto(); Assert.True(2 == duracion); }
public TestProcesoProductivo() { ProcesoProductivoGeneral = new ProcesoProductivoEmpleadosServicio(new List <Orden>() { new Orden((new List <Etapas>() { new Etapas(new Empleado() { Nombre = "lucas", Dni = 32638916, Id = 1 }, 20, "Preparacion") }), new List <MateriasPrima>() { new MateriasPrima() { Nombre = "Pintura", Id = 1, Cantidad = 30, Costo = 1000 } }, DateTime.Now) }); }