Exemple #1
0
        public async Task ShouldThrowErrorWhenInValidInformation()
        {
            var query = new GetSessionDetailQuery(_adminUserId, _sessionId + 1, _tenantId);

            await Assert.ThrowsAsync <NotFoundException>(async() =>
                                                         await _getSessionDetailQueryHandler.Handle(query, CancellationToken.None));
        }
Exemple #2
0
        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);
        }