public void AsAnonymous_ShouldReturnUnauthorizedAccessException() { var query = new GetVermittlerDetailQuery() { VermittlerId = 1 }; FluentActions.Invoking(async() => await SendAsync(query)).Should().Throw <UnauthorizedAccessException>(); }
public void AsAdmin_ShouldReturnNotFoundException() { RunAsAdminUser(); var query = new GetVermittlerDetailQuery() { VermittlerId = -1 }; FluentActions.Invoking(async() => await SendAsync(query)).Should().Throw <NotFoundException>(); }