Example #1
0
        public AnuncioServiceIntegrationTest()
        {
            //Arrange
            string                    connectionString         = "Server=HIDEAKIUCHIDA;Database=EVERESTDB;Integrated Security=True;";
            string                    avanticaConnectionString = "Server=LIM-WS00279\\SQLEXPRESS;Database=EVERESTDB;Integrated Security=True;";
            IDbConnection             dbConnection             = new SqlConnection(avanticaConnectionString);
            IAnuncioRepository        anuncioRepository        = new AnuncioRepository(dbConnection);
            IAnuncioDetalleRepository anuncioDetalleRepository = new AnuncioDetalleRepository(dbConnection);
            IUbicacionRepository      ubicacionRepository      = new UbicacionRepository(dbConnection);
            IUsuarioRepository        usuarioRepository        = new UsuarioRepository(dbConnection);
            ITipoPropiedadRepository  tipoPropiedadRepository  = new TipoPropiedadRepository(dbConnection);
            IEvaluacionRepository     evaluacionRepository     = new EvaluacionRepository(dbConnection);
            IImagenRepository         imagenRepository         = new ImagenRepository(dbConnection);
            IMapper                   mapper = new Mapper(
                new MapperConfiguration(
                    configure => { configure.AddProfile <AutoMapperProfiles>(); }
                    )
                );

            _anuncioService = new AnuncioService(anuncioRepository, anuncioDetalleRepository, usuarioRepository,
                                                 tipoPropiedadRepository, ubicacionRepository, evaluacionRepository, imagenRepository, mapper);

            ValidCreacionAnuncioRequest = AnuncioFake.GetCreacionAnuncioRequest();
            ValidEdicionAnuncioRequest  = AnuncioFake.GetEdicionAnuncioRequest();
        }
Example #2
0
 private void InitializeRepositories()
 {
     this.publicacionRepository         = new PublicacionRepository();
     this.ubicacionRepository           = new UbicacionRepository();
     this.gradoDePublicacionRepository  = new GradoDePublicacionRepository();
     this.estadoDePublicacionRepository = new EstadoDePublicacionRepository();
     this.rubroRepository = new RubroRepository();
 }
Example #3
0
 public UbicacionesForm(Form callerForm, string codigoPublicacion)
 {
     InitializeComponent();
     this.callerForm          = callerForm;
     this.codPublicacion      = codigoPublicacion;
     this.ubicacionRepository = new UbicacionRepository();
     this.compraRepository    = new CompraRepository();
     this.clienteRepository   = new ClienteRepository();
     InitializeForm();
 }