public ListaLinealUnitTest() { this.componentContainer = new ComponentContainer(); this.componentContainer.Register <IListaLinealService, ListaLinealService>(); this.iListaLinealService = componentContainer.Resolve <IListaLinealService>(); }
public BusquedaVariableServiceUnitTest() { this.componentContainer = new ComponentContainer(); this.componentContainer.Register <IVariableService, VariableService>(); this.componentContainer.Register <IListaLinealService, ListaLinealService>(); this.iVariableService = componentContainer.Resolve <IVariableService>(); this.iListaLinealService = componentContainer.Resolve <IListaLinealService>(); }
public SeguridadUnitTest() { this.componentContainer = new ComponentContainer(); this.componentContainer.Register <ISeguridadService, SeguridadService>(); this.componentContainer.Register <IListaLinealService, ListaLinealService>(); this.iSeguridadService = componentContainer.Resolve <ISeguridadService>(); this.iListaLineal = componentContainer.Resolve <IListaLinealService>(); }
public CambiarOrdenUnitTest() { this.componentContainer = new ComponentContainer(); this.componentContainer.Register <IListaLinealOrdenService, ListaLinealOrdenService>(); this.componentContainer.Register <IListaLinealService, ListaLinealService>(); this.componentContainer.Register <ICategoriasService, CategoriaService>(); this.componentContainer.Register <IPlantillaService, PlantillaService>(); this.componentContainer.Register <IModuloService, ModuloService>(); this.componentContainer.Register <IAgrupadorService, AgrupadorService>(); this.iListaLinealOrdenService = componentContainer.Resolve <IListaLinealOrdenService>(); this.iListaLinealService = componentContainer.Resolve <IListaLinealService>(); this.iCategoriaService = componentContainer.Resolve <ICategoriasService>(); this.iPlantillaService = componentContainer.Resolve <IPlantillaService>(); this.iModuloService = componentContainer.Resolve <IModuloService>(); this.iAgrupadorService = componentContainer.Resolve <IAgrupadorService>(); }
public PlantillaEstadistica GetPlantilla(decimal idPlantilla) { using (Tracer t = new Tracer()) { t.TraceVerbose("GetPlantilla idPlantilla: [{0}]", idPlantilla); PlantillaEstadistica plantilla = new PlantillaEstadistica() { Codigo = idPlantilla, Descripcion = string.Empty }; try { IListaLinealService listaService = ComponentContainer.Instance.Resolve <IListaLinealService>(); plantilla.Modulos = ConvertirADTOLocal(listaService.GetModulos(idPlantilla, Shared.Contrato.Models.Estado.Ambas)); foreach (var modulo in plantilla.Modulos) { modulo.Agrupadores = ConvertirADTOLocal(listaService.GetAgrupador(modulo.Codigo, Shared.Contrato.Models.Estado.Ambas)); foreach (var agrupador in modulo.Agrupadores) { agrupador.Variables = ConvertirADTOLocal(listaService.GetVariables(agrupador.Codigo, Shared.Contrato.Models.Estado.Ambas)); } } } catch (Exception ex) { String error = ex.Message; Console.WriteLine("Error = " + error); t.TraceError("Error = " + error); } return(plantilla); } }