Skip to content
Snippets Groups Projects
Commit 646a7659 authored by Rosen Georgiev's avatar Rosen Georgiev
Browse files

code review comments fix

parent 286e5ff0
No related branches found
No related tags found
1 merge request!23code review comments fix
Pipeline #61240 canceled with stage
in 51 seconds
...@@ -13,8 +13,8 @@ public class Data { ...@@ -13,8 +13,8 @@ public class Data {
private String mCredentialDefId; private String mCredentialDefId;
@SerializedName("id") @SerializedName("id")
private String mId; private String mId;
@SerializedName("presentationId") @SerializedName("proofRecordId")
private String mPresentationId; private String mproofRecordId;
@SerializedName("presentationMessage") @SerializedName("presentationMessage")
private String mPresentationMessage; private String mPresentationMessage;
@SerializedName("schemaId") @SerializedName("schemaId")
...@@ -58,12 +58,12 @@ public class Data { ...@@ -58,12 +58,12 @@ public class Data {
mId = id; mId = id;
} }
public String getPresentationId() { public String getProofRecordId() {
return mPresentationId; return mproofRecordId;
} }
public void setPresentationId(String presentationId) { public void setProofRecordId(String proofRecordId) {
mPresentationId = presentationId; mproofRecordId = proofRecordId;
} }
public String getPresentationMessage() { public String getPresentationMessage() {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"id": { "id": {
"type": "string" "type": "string"
}, },
"presentationId": { "proofRecordId": {
"type": "string" "type": "string"
}, },
"connectionId": { "connectionId": {
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
}, },
"required": [ "required": [
"id", "id",
"presentationId", "proofRecordId",
"connectionId", "connectionId",
"credentialDefId", "credentialDefId",
"schemaId", "schemaId",
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"id": { "id": {
"type": "string" "type": "string"
}, },
"presentationId": { "proofRecordId": {
"type": "string" "type": "string"
}, },
"connectionId": { "connectionId": {
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
}, },
"required": [ "required": [
"id", "id",
"presentationId", "proofRecordId",
"connectionId", "connectionId",
"credentialDefId", "credentialDefId",
"schemaId", "schemaId",
......
...@@ -104,14 +104,14 @@ public class ProofStepDefinitions extends BaseStepDefinitions { ...@@ -104,14 +104,14 @@ public class ProofStepDefinitions extends BaseStepDefinitions {
I_get_all_proof_presentations_via_OCM_Api(); I_get_all_proof_presentations_via_OCM_Api();
} }
@Given("^I get proof presentations with the current presentationId via OCM Api") @Given("^I get proof presentations with the current proofRecordId via OCM Api")
public void I_get_all_proof_presentations_with_the_current_presentationId_via_OCM_Api() { public void I_get_all_proof_presentations_with_the_current_proofRecordId_via_OCM_Api() {
I_get_proof_presentations_with_presentationId_via_OCM_Api(restSessionContainer.getCurrentPresentation().getData().getPresentationId()); I_get_proof_presentations_with_proofRecordId_via_OCM_Api(restSessionContainer.getCurrentPresentation().getData().getProofRecordId());
} }
@Given("^I get proof presentations with presentationId \\{(.*?)\\} via OCM Api") @Given("^I get proof presentations with proofRecordId \\{(.*?)\\} via OCM Api")
public void I_get_proof_presentations_with_presentationId_via_OCM_Api(String presentationId) { public void I_get_proof_presentations_with_proofRecordId_via_OCM_Api(String proofRecordId) {
currentRequest.setPath("/proof/v1/find-by-presentation-id?presentationId="+ presentationId); currentRequest.setPath("/proof/v1/find-by-presentation-id?proofRecordId="+ proofRecordId);
Response response = RestClient.get(currentRequest); Response response = RestClient.get(currentRequest);
addRequest(currentRequest); addRequest(currentRequest);
......
...@@ -33,7 +33,7 @@ Feature: API - OCM - attestation - v1 - schemas GET ...@@ -33,7 +33,7 @@ Feature: API - OCM - attestation - v1 - schemas GET
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
And the status code should be {200} And the status code should be {200}
And the response is valid according to the {Attestation_GET_schemas.json} REST schema And the response is valid according to the {Attestation_GET_schemas.json} REST schema
And the field {message} contains the value {Schemas fetch successfully} And the field {message} contains the value {Schemas fetched successfully}
And the field {$..count} is present and not empty And the field {$..count} is present and not empty
@schemas @schemas
...@@ -46,5 +46,5 @@ Feature: API - OCM - attestation - v1 - schemas GET ...@@ -46,5 +46,5 @@ Feature: API - OCM - attestation - v1 - schemas GET
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
And the status code should be {200} And the status code should be {200}
And the response is valid according to the {Attestation_GET_schemas.json} REST schema And the response is valid according to the {Attestation_GET_schemas.json} REST schema
And the field {message} contains the value {Schemas fetch successfully} And the field {message} contains the value {Schemas fetched successfully}
And the field {$.data.records} contains {1} elements And the field {$.data.records} contains {1} elements
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#You should have received a copy of the GNU Affero General Public License #You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>. #along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/ocm/proof/v1/find-by-presentation-id?presentationId={{presentation-id}} #http://localhost/ocm/proof/v1/find-by-presentation-id?proofRecordId={{proofRecordId}}
#Author: Rosen Georgiev rosen.georgiev@vereign.com #Author: Rosen Georgiev rosen.georgiev@vereign.com
#NOTE: Cannot be fully tested, because it needs connection to be made with PCM. #NOTE: Cannot be fully tested, because it needs connection to be made with PCM.
...@@ -29,14 +29,14 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET ...@@ -29,14 +29,14 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET
Given we are testing the OCM Api Given we are testing the OCM Api
@presentation @negative @presentation @negative
Scenario: OCM - Proof - Get proof presentation with presentationId - Positive Scenario: OCM - Proof - Get proof presentation with proofRecordId - Positive
Given I get proof presentations with presentationId {nonExistentId} via OCM Api Given I get proof presentations with proofRecordId {nonExistentId} via OCM Api
Then the field {statusCode} contains the value {404} Then the field {statusCode} contains the value {404}
And the status code should be {404} And the status code should be {404}
Then the field {message} contains the value {proof with proofRecordId "nonExistentId" not found.} Then the field {message} contains the value {proof with proofRecordId "nonExistentId" not found.}
@proof @bug-proof-25 @bug-proof-24 @proof @bug-proof-25 @bug-proof-24
Scenario: OCM - Proof - Get OOB presentation request via presentationId - Positive Scenario: OCM - Proof - Get OOB presentation request via proofRecordId - Positive
#Create a new member process connection #Create a new member process connection
Given an administrator generates a QR code by creating a connection with alias {member} via OCM api Given an administrator generates a QR code by creating a connection with alias {member} via OCM api
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
...@@ -58,10 +58,10 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET ...@@ -58,10 +58,10 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET
Then I send out of bound presentation request with the current data via OCM Api Then I send out of bound presentation request with the current data via OCM Api
And the status code should be {201} And the status code should be {201}
Then the field {statusCode} contains the value {201} Then the field {statusCode} contains the value {201}
#Get the request via presentationid #Get the request via proofRecordId
And I clear the request body And I clear the request body
Given I get proof presentations with the current presentationId via OCM Api Given I get proof presentations with the current proofRecordId via OCM Api
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
And the status code should be {200} And the status code should be {200}
Then the field {message} contains the value {Proof presentation fetch successfully} Then the field {message} contains the value {Proof presentation fetched successfully}
Then the field {$.data.state} contains the value {request-sent} Then the field {$.data.state} contains the value {request-sent}
\ No newline at end of file
...@@ -29,7 +29,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET ...@@ -29,7 +29,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET
Given I get all proof presentations via OCM Api Given I get all proof presentations via OCM Api
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
And the status code should be {200} And the status code should be {200}
Then the field {message} contains the value {Proof presentation fetch successfully} Then the field {message} contains the value {Proof presentations fetched successfully}
And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema
@proof @proof
...@@ -37,7 +37,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET ...@@ -37,7 +37,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET
Given I get all proof presentations with pageSize {5} and page {0} via OCM api Given I get all proof presentations with pageSize {5} and page {0} via OCM api
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
And the status code should be {200} And the status code should be {200}
Then the field {message} contains the value {Proof presentation fetch successfully} Then the field {message} contains the value {Proof presentations fetched successfully}
And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema
And the field {$.data.records} contains {5} elements And the field {$.data.records} contains {5} elements
...@@ -46,6 +46,6 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET ...@@ -46,6 +46,6 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET
Given I get all proof presentations with pageSize {9999} and page {999} via OCM api Given I get all proof presentations with pageSize {9999} and page {999} via OCM api
Then the field {statusCode} contains the value {200} Then the field {statusCode} contains the value {200}
And the status code should be {200} And the status code should be {200}
Then the field {message} contains the value {Proof presentation fetch successfully} Then the field {message} contains the value {Proof presentations fetched successfully}
And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema
And the field {$.data.records} contains {0} elements And the field {$.data.records} contains {0} elements
\ No newline at end of file
...@@ -52,7 +52,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST ...@@ -52,7 +52,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST
Then I send out of bound presentation request with the current data via OCM Api Then I send out of bound presentation request with the current data via OCM Api
And the status code should be {201} And the status code should be {201}
Then the field {statusCode} contains the value {201} Then the field {statusCode} contains the value {201}
Then the field {message} contains the value {Presentation request send successfully} Then the field {message} contains the value {Presentation request sent successfully}
Then the field {$.data.credentialDefId} contains the value {} Then the field {$.data.credentialDefId} contains the value {}
Then the field {$.data.status} contains the value {request-sent} Then the field {$.data.status} contains the value {request-sent}
And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema
...@@ -64,7 +64,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST ...@@ -64,7 +64,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST
Then I send out of bound presentation request via OCM Api Then I send out of bound presentation request via OCM Api
And the status code should be {201} And the status code should be {201}
Then the field {statusCode} contains the value {201} Then the field {statusCode} contains the value {201}
Then the field {message} contains the value {Presentation request send successfully} Then the field {message} contains the value {Presentation request sent successfully}
Then the field {$.data.credentialDefId} contains the value {} Then the field {$.data.credentialDefId} contains the value {}
Then the field {$.data.status} contains the value {request-sent} Then the field {$.data.status} contains the value {request-sent}
And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment