public async Task ShouldThrowErrorWhenInValidInformation() { var query = new GetSessionDetailQuery(_adminUserId, _sessionId + 1, _tenantId); await Assert.ThrowsAsync <NotFoundException>(async() => await _getSessionDetailQueryHandler.Handle(query, CancellationToken.None)); }
public async Task ShouldGetModelForValidInformation() { var query = new GetSessionDetailQuery(_adminUserId, _sessionId, _tenantId); var model = await _getSessionDetailQueryHandler.Handle(query, CancellationToken.None); Assert.Null(model.Errors); Assert.Equal(expected: _context.Sessions.FirstOrDefault()?.Name, actual: model.Items.Single().Name, ignoreCase: true); }