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); }
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(); }
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; }
public ComentariosController(IComentarioService publicacaoService) { _publicacaoService = publicacaoService; }
public LibrosController() { libroServ = new LibrosService(); comentarioServ = new ComentarioService(); }
public ComentarioController(IComentarioService service) { this.service = service; }
public ForumController(IForumService forumService, IComentarioService comentarioService) { _forumService = forumService; _comentarioService = comentarioService; }
public ComentariosController(IComentarioService comentarioService) { this.comentarioService = comentarioService; }