Example #1
0
        public void AsAnonymous_ShouldReturnUnauthorizedAccessException()
        {
            var query = new GetVermittlerDetailQuery()
            {
                VermittlerId = 1
            };

            FluentActions.Invoking(async() =>
                                   await SendAsync(query)).Should().Throw <UnauthorizedAccessException>();
        }
Example #2
0
        public void AsAdmin_ShouldReturnNotFoundException()
        {
            RunAsAdminUser();

            var query = new GetVermittlerDetailQuery()
            {
                VermittlerId = -1
            };

            FluentActions.Invoking(async() =>
                                   await SendAsync(query)).Should().Throw <NotFoundException>();
        }