Skip to content

Commit

Permalink
Fix api break
Browse files Browse the repository at this point in the history
Signed-off-by: David Schwilk <david.schwilk@bosch.io>
  • Loading branch information
DerSchwilk committed Dec 10, 2021
1 parent f295bc0 commit 74ff01c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public PolicyId getEntityId() {
*
* @return the created PolicyEntry.
*/
public Optional<PolicyEntry> getPolicyEntry() {
public Optional<PolicyEntry> getPolicyEntryCreated() {
return Optional.ofNullable(policyEntry);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public PolicyId getEntityId() {
*
* @return the Policy.
*/
public Optional<Policy> getPolicy() {
public Optional<Policy> getPolicyCreated() {
return Optional.ofNullable(policy);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public Label getLabel() {
*
* @return the created Resource.
*/
public Optional<Resource> getResource() {
public Optional<Resource> getResourceCreated() {
return Optional.ofNullable(resource);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public Label getLabel() {
*
* @return the created Subject.
*/
public Optional<Subject> getSubject() {
public Optional<Subject> getSubjectCreated() {
return Optional.ofNullable(subject);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ public void createInstanceFromValidJson() {
ModifyPolicyEntryResponse.fromJson(KNOWN_JSON_CREATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestCreated).isNotNull();
assertThat(underTestCreated.getPolicyEntry()).hasValue(TestConstants.Policy.POLICY_ENTRY);
assertThat(underTestCreated.getPolicyEntryCreated()).hasValue(TestConstants.Policy.POLICY_ENTRY);

final ModifyPolicyEntryResponse underTestUpdated =
ModifyPolicyEntryResponse.fromJson(KNOWN_JSON_UPDATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestUpdated).isNotNull();
assertThat(underTestUpdated.getPolicyEntry()).isEmpty();
assertThat(underTestUpdated.getPolicyEntryCreated()).isEmpty();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ public void createInstanceFromValidJson() {
ModifyPolicyResponse.fromJson(KNOWN_JSON_CREATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestCreated).isNotNull();
assertThat(underTestCreated.getPolicy()).hasValue(TestConstants.Policy.POLICY);
assertThat(underTestCreated.getPolicyCreated()).hasValue(TestConstants.Policy.POLICY);

final ModifyPolicyResponse underTestUpdated =
ModifyPolicyResponse.fromJson(KNOWN_JSON_UPDATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestUpdated).isNotNull();
assertThat(underTestUpdated.getPolicy()).isEmpty();
assertThat(underTestUpdated.getPolicyCreated()).isEmpty();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ public void createInstanceFromValidJson() {
ModifyResourceResponse.fromJson(KNOWN_JSON_CREATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestCreated).isNotNull();
assertThat(underTestCreated.getResource()).hasValue(TestConstants.Policy.RESOURCE);
assertThat(underTestCreated.getResourceCreated()).hasValue(TestConstants.Policy.RESOURCE);

final ModifyResourceResponse underTestUpdated =
ModifyResourceResponse.fromJson(KNOWN_JSON_UPDATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestUpdated).isNotNull();
assertThat(underTestUpdated.getResource()).isEmpty();
assertThat(underTestUpdated.getResourceCreated()).isEmpty();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ public void createInstanceFromValidJson() {
ModifySubjectResponse.fromJson(KNOWN_JSON_CREATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestCreated).isNotNull();
assertThat(underTestCreated.getSubject()).hasValue(TestConstants.Policy.SUBJECT);
assertThat(underTestCreated.getSubjectCreated()).hasValue(TestConstants.Policy.SUBJECT);

final ModifySubjectResponse underTestUpdated =
ModifySubjectResponse.fromJson(KNOWN_JSON_UPDATED, TestConstants.EMPTY_DITTO_HEADERS);

assertThat(underTestUpdated).isNotNull();
assertThat(underTestUpdated.getSubject()).isEmpty();
assertThat(underTestUpdated.getSubjectCreated()).isEmpty();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void modifyPolicy() {
},
ModifyPolicyResponse.class,
response -> {
assertThat(response.getPolicy()).isNotPresent();
assertThat(response.getPolicyCreated()).isNotPresent();
}
);
}
Expand Down Expand Up @@ -117,7 +117,7 @@ public void modifyPolicyWithSubjectHavingExpiryTimestamp() {
},
ModifyPolicyResponse.class,
response -> {
assertThat(response.getPolicy()).isNotPresent();
assertThat(response.getPolicyCreated()).isNotPresent();
}
);
}
Expand Down

0 comments on commit 74ff01c

Please sign in to comment.