Exemple #1
0
        public void Initialize()
        {
            //Arrange
            var builder = new DbContextOptionsBuilder <SosCidadaoContext>();

            builder.UseInMemoryDatabase("SosCidadaoContext");
            var options = builder.Options;

            _context = new SosCidadaoContext(options);
            _context.Database.EnsureDeleted();
            _context.Database.EnsureCreated();
            var autores = new List <Comentario>
            {
                new Comentario {
                    IdOcorrencia = 1, Descricao = "Carro havia uma porta amassada", DataCadastro = DateTime.Parse("2021-12-31")
                },
                new Comentario {
                    IdOcorrencia = 1, Descricao = "FOi visto pela última vez do posto Santo Bello.", DataCadastro = DateTime.Parse("2021-01-25")
                },
            };

            _context.AddRange(autores);
            _context.SaveChanges();

            _comentarioService = new ComentarioService(_context);
        }
Exemple #2
0
 public ComentarioApplicationServiceBase(IComentarioService service, IUnitOfWork uow, ICache cache, CurrentUser user) :
     base(service, uow, cache)
 {
     base.SetTagNameCache("Comentario");
     this._validatorAnnotations = new ValidatorAnnotations <ComentarioDto>();
     this._service = service;
     this._user    = user;
 }
 public ComentarioController(IComentarioService @object, IMapper mapper)
 {
     this.@object = @object;
     this.mapper  = mapper;
 }
 public ComentarioController(IComentarioService comentario, IPessoaService pessoaService, IMapper mapper)
 {
     _comentarioService = comentario;
     _pessoaService     = pessoaService;
     _mapper            = mapper;
 }
 public SesionController()
 {
     comentarioServ = new ComentarioService();
 }
Exemple #6
0
 public ComentarioApplicationService(IComentarioService service, IUnitOfWork uow, ICache cache, CurrentUser user) :
     base(service, uow, cache, user)
 {
 }
 public ComentarioController(IComentarioService comentarioService)
 {
     _comentarioService = comentarioService;
 }
 public ComentarioController(IComentarioService pComentarioService)
 {
     comentarioService = pComentarioService;
 }
 public BlogFacade(IArtigoService artigoService, IComentarioService comentarioService, IMapper mapper)
 {
     this.artigoService     = artigoService;
     this.comentarioService = comentarioService;
     this.mapper            = mapper;
 }
Exemple #10
0
 public ComentariosController(IComentarioService publicacaoService)
 {
     _publicacaoService = publicacaoService;
 }
 public LibrosController()
 {
     libroServ      = new LibrosService();
     comentarioServ = new ComentarioService();
 }
Exemple #12
0
 public ComentarioController(IComentarioService service)
 {
     this.service = service;
 }
Exemple #13
0
 public ForumController(IForumService forumService,
                        IComentarioService comentarioService)
 {
     _forumService      = forumService;
     _comentarioService = comentarioService;
 }
Exemple #14
0
 public ComentariosController(IComentarioService comentarioService)
 {
     this.comentarioService = comentarioService;
 }