public void Setup() { var context = new BookingsDbContext(BookingsDbContextOptions); var hearingService = new HearingService(context); _commandHandler = new UpdateParticipantCommandHandler(context, hearingService); _newHearingId = Guid.Empty; }
public void Setup() { var context = new BookingsDbContext(BookingsDbContextOptions); var hearingService = new HearingService(context); _commandHandler = new AddParticipantsToVideoHearingCommandHandler(context, hearingService); _getHearingByIdQueryHandler = new GetHearingByIdQueryHandler(context); _newHearingId = Guid.Empty; }
public void Setup() { var context = new BookingsDbContext(BookingsDbContextOptions); _queryHandler = new GetHearingByIdQueryHandler(context); var hearingService = new HearingService(context); _commandHandler = new CreateVideoHearingCommandHandler(context, hearingService); _newHearingId = Guid.Empty; _secondHearingId = Guid.Empty; }
public async Task Setup() { _context = new BookingsDbContext(BookingsDbContextOptions); _getHearingByIdQueryHandler = new GetHearingByIdQueryHandler(_context); _genericCaseType = _context.CaseTypes .Include(x => x.CaseRoles) .ThenInclude(x => x.HearingRoles) .ThenInclude(x => x.UserRole) .Include(x => x.HearingTypes) .First(x => x.Name == "Generic"); var hearingService = new HearingService(_context); _hearing = await Hooks.SeedVideoHearing(); TestContext.WriteLine($"New seeded video hearing id: {_hearing.Id}"); _existingParticipants = new List <ExistingParticipantDetails>(); _newParticipants = new List <NewParticipant>(); _removedParticipantIds = new List <Guid>(); _linkedParticipants = new List <LinkedParticipantDto>(); _handler = new UpdateHearingParticipantsCommandHandler(_context, hearingService); }