@Test public void testGetRedirectURLWhenDeploymentAddressEndsWithExpectedDelimiterThenDeploymentAddressAndAuthUriShouldComeBackConcatenatedAfterEachOther() { String deploymentAddressWithDelimiterAtEnd = "https: String expected = format("%s%s", deploymentAddressWithDelimiterAtEnd, format(CB_AZ_APP_REDIRECT_URI_PATTERN, WORKSPACE_ID)); String result = underTest.getRedirectURL(WORKSPACE_ID, deploymentAddressWithDelimiterAtEnd); Assert.assertEquals(expected, result); }
String getRedirectURL(String workspaceId, String deploymentAddress) { String cbAzAppAuthUri = String.format(CB_AZ_APP_REDIRECT_URI_PATTERN, workspaceId); String replyUrl = deploymentAddress.endsWith(DELIMITER) ? deploymentAddress : deploymentAddress + DELIMITER; return replyUrl + cbAzAppAuthUri; }
AzureCredentialAppCreationCommand { String getRedirectURL(String workspaceId, String deploymentAddress) { String cbAzAppAuthUri = String.format(CB_AZ_APP_REDIRECT_URI_PATTERN, workspaceId); String replyUrl = deploymentAddress.endsWith(DELIMITER) ? deploymentAddress : deploymentAddress + DELIMITER; return replyUrl + cbAzAppAuthUri; } }
AzureCredentialAppCreationCommand { String getRedirectURL(String workspaceId, String deploymentAddress) { String cbAzAppAuthUri = String.format(CB_AZ_APP_REDIRECT_URI_PATTERN, workspaceId); String replyUrl = deploymentAddress.endsWith(DELIMITER) ? deploymentAddress : deploymentAddress + DELIMITER; return replyUrl + cbAzAppAuthUri; }  }
AzureCredentialAppCreationCommand { String getRedirectURL(String workspaceId, String deploymentAddress) { String cbAzAppAuthUri = String.format(CB_AZ_APP_REDIRECT_URI_PATTERN, workspaceId); String replyUrl = deploymentAddress.endsWith(DELIMITER) ? deploymentAddress : deploymentAddress + DELIMITER; return replyUrl + cbAzAppAuthUri; }  String generate(String deploymentAddress); AzureApplicationCreationView generateJSON(String deploymentAddress); }
AzureCredentialAppCreationCommand { String getRedirectURL(String workspaceId, String deploymentAddress) { String cbAzAppAuthUri = String.format(CB_AZ_APP_REDIRECT_URI_PATTERN, workspaceId); String replyUrl = deploymentAddress.endsWith(DELIMITER) ? deploymentAddress : deploymentAddress + DELIMITER; return replyUrl + cbAzAppAuthUri; }  String generate(String deploymentAddress); AzureApplicationCreationView generateJSON(String deploymentAddress);  }