public void Should_Not_Get_All_Companies_If_Not_Authorized() { //Arrange _companyAppService.PermissionChecker = GetBlockerPermissionsChecker(); //Act Should.Throw <AbpAuthorizationException>(() => { _companyAppService.GetAll(new PagedAndSortedResultRequestDto()); }); }
public void ShouldNotGetAllCompaniesIfNotAuthorized() { //Arrange companyAppService.PermissionChecker = GetBlockerPermissionsChecker(); //Act Should.Throw <StudioXAuthorizationException>(() => { companyAppService.GetAll(new PagedAndSortedResultRequestDto()); }); }