Skip to content

Commit

Permalink
fix: Rename LogDestinationName.getId() to LogDestinationName.getDesti…
Browse files Browse the repository at this point in the history
…nationId() (#797)
  • Loading branch information
losalex committed Dec 11, 2021
1 parent e303a9b commit 62e7838
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -110,7 +110,7 @@ public LogName toLogName(String logId) {
}

/** Returns ID value associated with {@code LogDestinationName} object */
public String getId() {
public String getDestinationId() {
return getValue().toString();
}

Expand Down
Expand Up @@ -117,24 +117,24 @@ public void testWriteOptionWithDestination() {
LogDestinationName resource = (LogDestinationName) writeOption.getValue();
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
assertEquals(LogDestinationName.DestinationType.PROJECT, resource.getDestinationType());
assertEquals(PROJECT_NAME, resource.getId());
assertEquals(PROJECT_NAME, resource.getDestinationId());

writeOption = WriteOption.destination(LogDestinationName.billingAccount(BILLING_NAME));
resource = (LogDestinationName) writeOption.getValue();
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
assertEquals(LogDestinationName.DestinationType.BILLINGACCOUNT, resource.getDestinationType());
assertEquals(BILLING_NAME, resource.getId());
assertEquals(BILLING_NAME, resource.getDestinationId());

writeOption = WriteOption.destination(LogDestinationName.folder(FOLDER_NAME));
resource = (LogDestinationName) writeOption.getValue();
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
assertEquals(LogDestinationName.DestinationType.FOLDER, resource.getDestinationType());
assertEquals(FOLDER_NAME, resource.getId());
assertEquals(FOLDER_NAME, resource.getDestinationId());

writeOption = WriteOption.destination(LogDestinationName.organization(ORGANIZATION_NAME));
resource = (LogDestinationName) writeOption.getValue();
assertEquals(WriteOption.OptionType.LOG_DESTINATION, writeOption.getOptionType());
assertEquals(LogDestinationName.DestinationType.ORGANIZATION, resource.getDestinationType());
assertEquals(ORGANIZATION_NAME, resource.getId());
assertEquals(ORGANIZATION_NAME, resource.getDestinationId());
}
}

0 comments on commit 62e7838

Please sign in to comment.