Skip to content

Commit

Permalink
SortTest and BulkTest should execute even if ScimServiceProviderConfi…
Browse files Browse the repository at this point in the history
…g does not exist

Fix for wso2-incubator#10
  • Loading branch information
gclayburg committed Mar 6, 2018
1 parent 17e21da commit 584dfda
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import info.wso2.scim2.compliance.entities.TestResult;
import info.wso2.scim2.compliance.exception.ComplianceException;
import info.wso2.scim2.compliance.exception.CriticalComplianceException;
import info.wso2.scim2.compliance.objects.SCIMServiceProviderConfig;
import info.wso2.scim2.compliance.pdf.PDFGenerator;
import info.wso2.scim2.compliance.tests.*;
import info.wso2.scim2.compliance.tests.BulkTest;
Expand Down Expand Up @@ -218,8 +219,9 @@ public Result runTests(@FormParam(ComplianceConstants.RequestCodeConstants.URL)
// Sort Test
SortTest sortTest = new SortTest(complianceTestMetaDataHolder);
ArrayList<TestResult> sortTestResults = new ArrayList<>();
SCIMServiceProviderConfig scimServiceProviderConfig = complianceTestMetaDataHolder.getScimServiceProviderConfig();
try {
if (complianceTestMetaDataHolder.getScimServiceProviderConfig().getSortSupported()){
if (scimServiceProviderConfig != null && scimServiceProviderConfig.getSortSupported()){
try {
sortTestResults = sortTest.performTest();
} catch (ComplianceException e) {
Expand All @@ -239,7 +241,7 @@ public Result runTests(@FormParam(ComplianceConstants.RequestCodeConstants.URL)
BulkTest bulkTest = new BulkTest(complianceTestMetaDataHolder);
ArrayList<TestResult> bulkTestResults = new ArrayList<>();
try {
if (complianceTestMetaDataHolder.getScimServiceProviderConfig().getBulkSupported()){
if (scimServiceProviderConfig != null && scimServiceProviderConfig.getBulkSupported()){
try {
bulkTestResults = bulkTest.performTest();
} catch (ComplianceException e) {
Expand Down

0 comments on commit 584dfda

Please sign in to comment.