public CreateAgendaRequestValidator(IAgendaService agendaService, ISalaService salaService, IMapper mapper) { RuleFor(r => r.Titulo) .Must(p => !string.IsNullOrEmpty(p.Trim())).WithMessage("Campo [título] não deve ser vazio"); RuleFor(r => r.HorarioInicio) .NotEmpty().WithMessage("Campo [Horário Início] é obrigatório"); RuleFor(r => r.HorarioFim) .NotEmpty().WithMessage("Campo [Horário Fim] é obrigatório") .Must((entity, p) => { return(agendaService.ValidateSalaHorario(mapper.Map <Agenda>(entity))); }).WithMessage("O horário indicado já está em uso para a sala"); RuleFor(r => r.HorarioInicio) .LessThan(f => f.HorarioFim).WithMessage("Horário inicial deve ser menor do que horário final"); RuleFor(r => r.SalaId) .NotEmpty().WithMessage("Campo [Sala] é obrigatório") .Must(p => { var sala = salaService.GetAsync(p).Result; return(sala != null); }).WithMessage(m => "A sala de Id " + m.SalaId + " não existe"); }
public SalasController(ISalasRepository salasRepository, IMapper iMapper, ISalaService salaService) { _iSalasRepository = salasRepository; _iMapper = iMapper; _salaService = salaService; }
public ReservasController(ISalaRepository salaRepository, IReservaRepository reservaRepository, IMapper mapper, ISalaService salaService, IReservaService reservaService, INotificador notificador, IUser user) : base(notificador, user) { _salaRepository = salaRepository; _reservaRepository = reservaRepository; _mapper = mapper; _salaService = salaService; _reservaService = reservaService; }
public AgendamentosController(IAgendamentoService agendamentoService, IUsuarioService usuarioService, ISalaService salaService) { _agendamentoService = agendamentoService; _usuarioService = usuarioService; _salaService = salaService; }
public AdicionarParticipanteTest() { var sala = new Sala("Sala1"); var salas = new List <Sala> { sala }; var salaReposioty = new SalaRepository(salas); _salaService = new SalaService(salaReposioty); }
public AgendamentoService(IAgendamentoRepository agendamentoRepository, IUsuarioService usuarioService, ISalaService salaService, IEmailService emailService) { _agendamentoRepository = agendamentoRepository; _usuarioService = usuarioService; _emailService = emailService; _salaService = salaService; }
public EnviarMensagemPublicaTest() { var sala = new Sala("Sala1"); var salas = new List <Sala> { sala }; var salaReposioty = new SalaRepository(salas); _salaService = new SalaService(salaReposioty); _salaService.AdicionarParticipante("Sala1", "Pedro"); }
public MetodosAuxiliaresController(ISalaService salaService, IUsuarioService usuarioService, IUsuarioOrganizacaoService usuarioOrganizacaoService, IBlocoService blocoService, IOrganizacaoService organizacaoService) { _salaService = salaService; _usuarioService = usuarioService; _usuarioOrganizacaoService = usuarioOrganizacaoService; _blocoService = blocoService; _organizacaoService = organizacaoService; }
public AgendaTest() { salaRepository = new MockSalaRepository(); agendaRepository = new MockAgendaRepository(salaRepository); salaService = new SalaService(salaRepository); agendaService = new AgendaService(agendaRepository); var mapperConfig = new MapperConfiguration(cfg => { cfg.AddProfile <RequestToDomainProfile>(); }); mapper = mapperConfig.CreateMapper(); }
public SalaParticularController(ISalaService salaService, ISalaParticularService salaParticularService, IUsuarioService usuarioService, IBlocoService blocoService, IUsuarioOrganizacaoService usuarioOrganizacaoService, IOrganizacaoService organizacaoService) { _salaService = salaService; _salaParticularService = salaParticularService; _usuarioService = usuarioService; _blocoService = blocoService; _usuarioOrganizacaoService = usuarioOrganizacaoService; _organizacaoService = organizacaoService; }
public HardwareDeSalaController(IHardwareDeSalaService hardwareService, ITipoHardwareService tipoHardwareService, ISalaService salaService, IUsuarioService usuarioService, IOrganizacaoService organizacaoService, IBlocoService blocoService) { _hardwareService = hardwareService; _tipoHardwareService = tipoHardwareService; _salaService = salaService; _usuarioService = usuarioService; _organizacaoService = organizacaoService; _blocoService = blocoService; }
public ObterMensagensDoParticipanteTest() { var sala = new Sala("Sala1"); sala.AdicionarParticipante("Maria"); sala.EnviarMensagemPublica("Bom dia pessoal", "Maria"); var salas = new List <Sala> { sala }; var salaReposioty = new SalaRepository(salas); _salaService = new SalaService(salaReposioty); }
public PlanejamentoController(IPlanejamentoService service, ISalaService salaService, IUsuarioService usuarioService, IUsuarioOrganizacaoService usuarioOrganizacaoService, IBlocoService blocoService, IOrganizacaoService organizacaoService) { _planejamentoService = service; _salaService = salaService; _usuarioService = usuarioService; _usuarioOrganizacaoService = usuarioOrganizacaoService; _blocoService = blocoService; _organizacaoService = organizacaoService; }
public CitaController( ICitaService citaService, IMedicoService medicoService, ISalaService salaService, ITipoServicioService tipoServicioService, IPacienteService pacienteService) { _citaService = citaService; _medicoService = medicoService; _salaService = salaService; _tipoServicioService = tipoServicioService; _pacienteService = pacienteService; _horarios = new List <SelectListItem>(); }
public CreateSalaRequestValidator(ISalaService salaService) { RuleFor(r => r.Descricao) .Must(p => !string.IsNullOrEmpty(p.Trim())).WithMessage("Campo [descrição] não deve ser vazio") .Must((obj, p) => { var salas = salaService.GetByDescricaoAsync(obj.Descricao).Result; if (salas.Count() > 0) { return(false); } return(true); }) .WithMessage(m => "A descrição \'" + m.Descricao + "\' já existe"); }
public HomeController(ISalaParticularService salaParticularService, ISalaService salaService, IBlocoService blocoService, IUsuarioService usuarioService, IMonitoramentoService monitoramentoService, IHorarioSalaService horarioSalaService, ICodigoInfravermelhoService codigoInfravermelhoService) { _salaService = salaService; _salaParticularService = salaParticularService; _blocoService = blocoService; _monitoramentoService = monitoramentoService; _usuarioService = usuarioService; _horarioSalaService = horarioSalaService; _codigoInfravermelhoService = codigoInfravermelhoService; }
public ReservaSalaController( ISalaService salaService, IUsuarioService usuarioService, IBlocoService blocoService, IUsuarioOrganizacaoService usuarioOrganizacaoService, IOrganizacaoService organizacaoService, IHorarioSalaService horarioSalaService, IHardwareDeSalaService hardwareDeSalaService ) { _salaService = salaService; _usuarioService = usuarioService; _blocoService = blocoService; _usuarioOrganizacaoService = usuarioOrganizacaoService; _organizacaoService = organizacaoService; _horarioSalaService = horarioSalaService; _hardwareDeSalaService = hardwareDeSalaService; }
public EquipamentoController( IEquipamentoService equipamentoService, ICodigoInfravermelhoService codigoInfravermelhoService, ISalaService salaService, IOperacaoCodigoService operacaoService, IUsuarioService usuarioService, IUsuarioOrganizacaoService usuarioOrganizacaoService, IBlocoService blocoService, IOrganizacaoService organizacaoService, IHardwareDeSalaService hardwareDeSalaService ) { _equipamentoService = equipamentoService; _codigoInfravermelhoService = codigoInfravermelhoService; _salaService = salaService; _operacaoService = operacaoService; _usuarioService = usuarioService; _usuarioOrganizacaoService = usuarioOrganizacaoService; _blocoService = blocoService; _organizacaoService = organizacaoService; _hardwareDeSalaService = hardwareDeSalaService; }
public UpdateSalaRequestValidator(ISalaService salaService) { RuleFor(r => r.Id) .Must(p => { var sala = salaService.GetAsync(p).Result; return(sala != null); }) .WithMessage(m => "Sala de Id " + m.Id + " não foi encontrada"); RuleFor(r => r.Descricao) .Must(p => !string.IsNullOrEmpty(p.Trim())).WithMessage("Campo [descrição] não deve ser vazio") .Must((obj, p) => { var salas = salaService.GetByDescricaoAsync(obj.Descricao).Result.ToList(); if (salas.Where(w => w.Id != obj.Id).Count() > 0) { return(false); } return(true); }) .WithMessage(m => "A descrição \'" + m.Descricao + "\' já existe"); }
public RoomHandler(WebSocketConnectionManager webSocketConnectionManager, ISalaService salaService) : base(webSocketConnectionManager) { this.salaService = salaService; }
public SessaoController(ISessaoService sessaoService, IFilmeService filmeService, ISalaService salaService) { this.sessaoService = sessaoService; this.filmeService = filmeService; this.salaService = salaService; }
public SalaController(ISalaService salaService) { this.salaService = salaService; }
public SalasController(ISalaService salaService, IEquipamentoService equipamentoService) { _salaService = salaService; _equipamentoService = equipamentoService; }
public SalaController(ISalaService salaService, IMapper mapper) { this.salaService = salaService; this.mapper = mapper; }
public SalaController(ISalaService salaService) { _salaService = salaService; }
public SalasController(ISalaService service) { svc = service; }
public SalaAppService(ISalaService salaService) : base(salaService) { }
public SalaServiceTest() { _salaRepo = Substitute.For <ISalaRepository>(); _salaSvc = new SalaService(_salaRepo); }
public SalaController(ISalaService _salaService, ILogger <SalaController> _logger) { this.salaService = _salaService; this.logger = _logger; }
public SalaAppService(IMapper mapper, ISalaService salaService) { _mapper = mapper; _salaService = salaService; }