11package com .venafi .vcert .sdk .connectors .cloud ;
22
3- import static org .junit .Assert .assertEquals ;
4-
53import com .venafi .vcert .sdk .Config ;
64import com .venafi .vcert .sdk .connectors .cloud .domain .User ;
75import com .venafi .vcert .sdk .connectors .cloud .domain .UserResponse ;
@@ -38,15 +36,16 @@ public void createAndGetPolicy() throws VCertException {
3836
3937 PolicySpecification policySpecificationReturned = connector .getPolicy (policyName );
4038
41- //The returned policySpecification will have the policy's name so it will copied to the source policySpecification
42- //due it doesn't contain it
39+ //The returned policySpecification will contain the policy's name, which is not part of the source policy spec
40+ //Adding the name to the source policy spec in order to assert both objects.
4341 policySpecification .name (policySpecificationReturned .name ());
44- //The returned policySpecification will contains the default cloud CA, then it will needed
45- //to set it to the policySpecification source
42+
43+ // The returned policySpecification will contain the default cloud CA, which is omitted in the source policy spec
44+ // Adding the default CA to the source policy spec in order to assert both objects.
4645 policySpecification .policy ().certificateAuthority (VCertConstants .CLOUD_DEFAULT_CA );
4746
4847 //The returned policy specification will contain a single user, which is the one who created the policy
49- //on the first place. We add this user to the source policy spec in order to assert.
48+ //on the first place. Adding this user to the source policy spec in order to assert both objects .
5049 policySpecification .users (new String []{"jenkins@opensource.qa.venafi.io" });
5150
5251 Assertions .assertEquals (policySpecification , policySpecificationReturned );
@@ -66,13 +65,13 @@ public void createAndGetPolicyForDigicert() throws VCertException {
6665 connector .setPolicy (policyName , policySpecification );
6766
6867 PolicySpecification policySpecificationReturned = connector .getPolicy (policyName );
69-
70- //The returned policySpecification will have the policy's name so it will copied to the source policySpecification
71- //due it doesn't contain it
68+
69+ //The returned policySpecification will contain the policy's name, which is not part of the source policy spec
70+ //Adding the name to the source policy spec in order to assert both objects.
7271 policySpecification .name (policySpecificationReturned .name ());
7372
7473 //The returned policy specification will contain a single user, which is the one who created the policy
75- //on the first place. We add this user to the source policy spec in order to assert.
74+ //on the first place. Adding this user to the source policy spec in order to assert both objects .
7675 policySpecification .users (new String []{"jenkins@opensource.qa.venafi.io" });
7776
7877 Assertions .assertEquals (policySpecification , policySpecificationReturned );
@@ -92,21 +91,21 @@ public void createAndGetPolicyForEntrust() throws VCertException {
9291 connector .setPolicy (policyName , policySpecification );
9392
9493 PolicySpecification policySpecificationReturned = connector .getPolicy (policyName );
95-
96- //The returned policySpecification will have the policy's name so it will copied to the source policySpecification
97- //due it doesn't contain it
94+
95+ //The returned policySpecification will contain the policy's name, which is not part of the source policy spec
96+ //Adding the name to the source policy spec in order to assert both objects.
9897 policySpecification .name (policySpecificationReturned .name ());
9998
10099 //The returned policy specification will contain a single user, which is the one who created the policy
101- //on the first place. We add this user to the source policy spec in order to assert.
100+ //on the first place. Adding this user to the source policy spec in order to assert both objects .
102101 policySpecification .users (new String []{"jenkins@opensource.qa.venafi.io" });
103102
104- assertEquals (policySpecification , policySpecificationReturned );
103+ Assertions . assertEquals (policySpecification , policySpecificationReturned );
105104 }
106105
107106 @ Test
108107 @ DisplayName ("Cloud - Testing the userByName endpoint" )
109- public void getUserByName () throws VCertException {
108+ public void getUserByName () {
110109 Config config = null ;
111110 Cloud cloud = Cloud .connect (config );
112111
0 commit comments