Example #1
0
        public MockAgendaRepository(ISalaRepository salaRepository)
        {
            this.salaRepository = salaRepository;

            context.Add(new Agenda
            {
                Id            = 1,
                HorarioInicio = new DateTime(2019, 1, 12),
                HorarioFim    = new DateTime(2019, 1, 20),
                Sala          = salaRepository.GetAsync(1).Result,
            });

            context.Add(new Agenda
            {
                Id            = 2,
                HorarioInicio = new DateTime(2019, 1, 12),
                HorarioFim    = new DateTime(2019, 1, 20),
                Sala          = salaRepository.GetAsync(2).Result,
            });

            foreach (var item in context)
            {
                item.SalaId = item.Sala?.Id ?? 0;
            }
        }
 public ObterSalasQueryHandler(IDomainNotificationHandler notification,
                               IMapper mapper,
                               ISalaRepository salaRepository)
     : base(notification, mapper)
 {
     _salaRepository = salaRepository;
 }
Example #3
0
 public SessaoHandlerTests()
 {
     _espetaculoRepository = new FakeEspetaculoRepository();
     _sessaoRepository     = new FakeSessaoRepository();
     _salaRepository       = new FakeSalaRepository();
     _handler = new SessaoHandler(_espetaculoRepository, _salaRepository, _sessaoRepository);
 }
 public NovaSalaCommandHandler(IMediator mediator,
                               IDomainNotificationHandler notification,
                               ISalaRepository salaRepository)
     : base(mediator, notification)
 {
     _salaRepository = salaRepository;
 }
 public SalaApplicationService(ISalaRepository salaRepository,
                               ISalaProfessorRelacionalRepository salaProfessorRelacionalRepository,
                               IAlunoRepository alunoRepository)
 {
     _salaRepository = salaRepository;
     _salaProfessorRelacionalRepository = salaProfessorRelacionalRepository;
     _alunoRepository = alunoRepository;
 }
 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;
 }
Example #7
0
        public ObterTest()
        {
            var salas = new List <Sala> {
                new Sala("Sala1"), new Sala("Sala2")
            };

            _salaRepository = new SalaRepository(salas);
        }
Example #8
0
 public NovoAgendamentoCommandHandler(IMediator mediator,
                                      IDomainNotificationHandler notification,
                                      ISalaRepository salaRepository,
                                      IAgendamentoRepository agendamentoRepository)
     : base(mediator, notification)
 {
     _salaRepository        = salaRepository;
     _agendamentoRepository = agendamentoRepository;
 }
        public void SalaSystemTestSetUp()
        {
            BaseSqlTest.SeedDeleteDatabase();
            BaseSqlTest.SeedInsertDatabase();

            _salaRepository = new SalaRepository();
            _salaService    = new SalaService(_salaRepository);
            _salaDefault    = SalaObjectMother.Default;
        }
 public ResponsavelApplicationService(IResponsavelRepository responsavelRepository,
                                      IAlunoRepository alunoRepository,
                                      IUsuarioApplicationService usuarioApplicationService,
                                      ISalaRepository salaRepository)
 {
     _responsavelRepository     = responsavelRepository;
     _alunoRepository           = alunoRepository;
     _usuarioApplicationService = usuarioApplicationService;
     _salaRepository            = salaRepository;
 }
Example #11
0
        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();
        }
Example #12
0
 public ReunioesController(IReuniaoRepository reuniaoRepository, IMapper mapper, ISalaRepository salaRepository)
 {
     _reuniaoRepository = reuniaoRepository;
     _mapper            = mapper;
     _salaRepository    = salaRepository;
 }
 public SalaService(ISalaRepository salaRepository) : base(salaRepository)
 {
     this.salaRepository = salaRepository;
 }
Example #14
0
 public SalaHandler(ISalaRepository repository)
 {
     _repository = repository;
 }
 public SalaService(ISalaRepository repository)
 {
     salaRepository = repository;
 }
Example #16
0
 public SalaService(ISalaRepository _salaRepository, ILogger <SalaService> _logger)
 {
     this.salaRepository = _salaRepository;
     this.logger         = _logger;
 }
Example #17
0
 public ReservaService(IReservaRepository reservaRepository, ISalaRepository salaRepository, INotificador notificador) : base(notificador)
 {
     _reservaRepository = reservaRepository;
     _salaRepository    = salaRepository;
 }
Example #18
0
 public SalaBusiness(ISalaRepository salaRepository, IJogadorBusiness jogadorBusiness)
 {
     _salaRepository  = salaRepository;
     _jogadorBusiness = jogadorBusiness;
 }
Example #19
0
 public SalaService(ISalaRepository repository) : base(repository)
 {
     _repository = repository;
 }
Example #20
0
 public SalaService(ISalaRepository repository, SalaHandler handle)
 {
     _handle     = handle;
     _repository = repository;
 }
Example #21
0
 public SessaoApplication(ISessaoRepository sessaoRepository, IFilmeRepository filmeRepository, ISalaRepository salaRepository)
 {
     _sessaoRepository = sessaoRepository;
     _filmeRepository  = filmeRepository;
     _salaRepository   = salaRepository;
 }
Example #22
0
 public SalaNaoPodeTerOMesmoNomeDeOutraSalaSpecification(ISalaRepository repository)
 {
     this.repository = repository;
 }
Example #23
0
 public SalaService(ISalaRepository SalaRepository, INotificador notificador) : base(notificador)
 {
     _SalaRepository = SalaRepository;
 }
Example #24
0
 public SessaoService(ISessaoRepository sessaoRepository, IFilmeRepository filmeRepository, ISalaRepository salaRepository)
 {
     this.sessaoRepository = sessaoRepository;
     this.filmeRepository  = filmeRepository;
     this.salaRepository   = salaRepository;
 }
Example #25
0
 public SalaCommandHandler(ISalaRepository salaRepository)
 {
     _salaRepository = salaRepository;
 }
Example #26
0
 public SalaService(ISalaRepository repo)
 {
     _repo = repo;
 }
Example #27
0
 public void Initialize()
 {
     BaseSqlTest.SeedDatabase();
     _repository = new SalaSQLRepository();
 }
Example #28
0
 public SalasController(ISalaRepository repo)
 {
     SalaRepo = repo;
 }
        public ReservaService(IReservaRepository repository, ISalaRepository salaRepository)
        {
            reservaRepository = repository;

            salaService = new SalaService(salaRepository);
        }
Example #30
0
 public ReservaService(IReservaRepository repository, ReservaHandler handle, ISalaRepository _salaRepository)
 {
     _repository = repository;
     _handle     = handle;
 }
Example #31
0
 public SalaService(ISalaRepository salaRepository)
 {
     _salaRepository = salaRepository;
 }
Example #32
0
 public SalaServiceTest()
 {
     _salaRepo = Substitute.For <ISalaRepository>();
     _salaSvc  = new SalaService(_salaRepo);
 }