public abstract class ESBIntegrationTest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected StockQuoteClient |
axis2Client |
protected org.wso2.carbon.automation.engine.context.AutomationContext |
context |
protected org.wso2.carbon.automation.engine.context.beans.ContextUrls |
contextUrls |
protected ESBTestCaseUtils |
esbUtils |
protected org.apache.commons.logging.Log |
log |
protected String |
sessionCookie |
protected org.apache.axiom.om.OMElement |
synapseConfiguration |
protected org.wso2.carbon.automation.engine.context.beans.Tenant |
tenantInfo |
protected org.wso2.carbon.automation.engine.context.beans.User |
userInfo |
protected org.wso2.carbon.automation.engine.context.TestUserMode |
userMode |
| Constructor and Description |
|---|
ESBIntegrationTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addApi(org.apache.axiom.om.OMElement api) |
protected void |
addEndpoint(org.apache.axiom.om.OMElement endpointConfig) |
protected void |
addImport(String libName,
String packageName) |
protected void |
addInboundEndpoint(org.apache.axiom.om.OMElement inboundEndpoint) |
protected void |
addLocalEntry(org.apache.axiom.om.OMElement localEntryConfig) |
protected void |
addMessageProcessor(org.apache.axiom.om.OMElement messageProcessorConfig) |
protected void |
addMessageStore(org.apache.axiom.om.OMElement messageStoreConfig) |
protected void |
addPriorityExecutor(org.apache.axiom.om.OMElement priorityExecutor) |
protected void |
addProxyService(org.apache.axiom.om.OMElement proxyConfig) |
protected void |
addScheduledTask(org.apache.axiom.om.OMElement task) |
protected void |
addSequence(org.apache.axiom.om.OMElement sequenceConfig) |
protected void |
addSequenceTemplate(org.apache.axiom.om.OMElement sequenceTemplate) |
protected void |
applySecurity(String serviceName,
int policyId,
String[] userGroups) |
protected void |
cleanup() |
protected void |
deleteApi(String api)
Deletes an api with the given name.
|
protected void |
deleteImport(String importQualifiedName) |
protected void |
deleteInboundEndpoint(String name) |
protected void |
deleteInboundEndpointFromName(String name) |
protected void |
deleteLibrary(String fullQualifiedName) |
protected void |
deleteProxyService(String proxyServiceName) |
protected void |
deleteSequence(String sequenceName) |
protected DataHandler |
downloadLibraryArchive(String fileName) |
protected String[] |
getAllImports() |
protected String[] |
getAllLibraries() |
protected org.wso2.carbon.mediation.library.stub.types.carbon.LibraryInfo[] |
getAllLibraryInfo() |
protected String |
getApiInvocationURL(String apiName) |
protected String |
getBackEndServiceUrl(String serviceName) |
protected String |
getESBResourceLocation() |
protected String |
getImport(String qualifiedName) |
protected org.wso2.carbon.mediation.library.stub.types.carbon.LibraryInfo |
getLibraryInfo(String libName,
String packageName) |
protected String |
getMainSequenceURL() |
protected String |
getProxyServiceURLHttp(String proxyServiceName) |
protected String |
getProxyServiceURLHttps(String proxyServiceName) |
protected String |
getSessionCookie() |
protected org.wso2.carbon.application.mgt.synapse.stub.types.carbon.SynapseApplicationMetadata |
getSynapseAppData(String appName) |
protected String[] |
getUserRole() |
protected void |
init() |
protected void |
init(String tenantName,
String userName)
Initialize the context given a tenant domain and a user.
|
protected void |
init(org.wso2.carbon.automation.engine.context.TestUserMode userMode) |
protected void |
isEndpointDeployed(String endpointName) |
protected void |
isInboundUndeployed(String inboundEndpoint) |
protected void |
isLocalEntryDeployed(String localEntryName) |
protected void |
isProxyDeployed(String proxyServiceName) |
protected void |
isProxyNotDeployed(String proxyServiceName) |
protected boolean |
isRunningOnStratos() |
protected void |
loadESBConfigurationFromClasspath(String relativeFilePath) |
protected void |
loadSampleESBConfiguration(int sampleNo) |
protected org.apache.axiom.om.OMElement |
loadSampleESBConfigurationWithoutApply(int sampleNo) |
protected String |
login(org.wso2.carbon.automation.engine.context.AutomationContext context) |
protected void |
reloadSessionCookie()
This method to be used after restart the server to update the sessionCookie variable.
|
protected org.apache.axiom.om.OMElement |
replaceEndpoints(String relativePathToConfigFile,
String serviceName,
String port) |
protected void |
restoreSynapseConfig() |
protected DataHandler |
setEndpoints(DataHandler dataHandler) |
protected org.apache.axiom.om.OMElement |
setEndpoints(org.apache.axiom.om.OMElement synapseConfig) |
protected void |
updateConnectorStatus(String libQName,
String libName,
String packageName,
String status) |
protected void |
updateESBConfiguration(org.apache.axiom.om.OMElement synapseConfig) |
protected void |
updateESBRegistry(String resourcePath) |
protected void |
updateInboundEndpoint(org.apache.axiom.om.OMElement inboundEndpoint) |
protected void |
uploadCapp(String appname,
DataHandler dataHandler) |
protected void |
uploadConnector(String repoLocation,
String strFileName) |
protected void |
verifyAPIExistence(String apiName) |
protected void |
verifyEndpointExistence(String endpointName) |
protected void |
verifyLocalEntryExistence(String localEntry) |
protected void |
verifyMessageProcessorExistence(String processorName) |
protected void |
verifyMessageStoreExistence(String storeName) |
protected void |
verifyProxyServiceExistence(String proxyServiceName) |
protected void |
verifySequenceExistence(String sequenceName) |
protected org.apache.commons.logging.Log log
protected StockQuoteClient axis2Client
protected org.wso2.carbon.automation.engine.context.beans.ContextUrls contextUrls
protected String sessionCookie
protected org.apache.axiom.om.OMElement synapseConfiguration
protected ESBTestCaseUtils esbUtils
protected org.wso2.carbon.automation.engine.context.AutomationContext context
protected org.wso2.carbon.automation.engine.context.beans.Tenant tenantInfo
protected org.wso2.carbon.automation.engine.context.beans.User userInfo
protected org.wso2.carbon.automation.engine.context.TestUserMode userMode
protected void init(String tenantName, String userName) throws Exception
tenantName - the name of the tenant domain. Should be one of the domains specified in the automation.xmluserName - The name of the user to be initializedException - if an error occurs during context initializationprotected void init(org.wso2.carbon.automation.engine.context.TestUserMode userMode)
throws Exception
Exceptionprotected String getMainSequenceURL()
protected void loadSampleESBConfiguration(int sampleNo)
throws Exception
Exceptionprotected org.apache.axiom.om.OMElement loadSampleESBConfigurationWithoutApply(int sampleNo)
throws Exception
Exceptionprotected void loadESBConfigurationFromClasspath(String relativeFilePath) throws Exception
Exceptionprotected void deleteLibrary(String fullQualifiedName) throws org.wso2.carbon.mediation.library.stub.MediationLibraryAdminServiceException, RemoteException
org.wso2.carbon.mediation.library.stub.MediationLibraryAdminServiceExceptionRemoteExceptionprotected String[] getAllImports() throws RemoteException
RemoteExceptionprotected void updateESBConfiguration(org.apache.axiom.om.OMElement synapseConfig)
throws Exception
Exceptionprotected void addProxyService(org.apache.axiom.om.OMElement proxyConfig)
throws Exception
Exceptionprotected void addInboundEndpoint(org.apache.axiom.om.OMElement inboundEndpoint)
throws Exception
Exceptionprotected void isInboundUndeployed(String inboundEndpoint) throws Exception
Exceptionprotected void updateInboundEndpoint(org.apache.axiom.om.OMElement inboundEndpoint)
throws Exception
Exceptionprotected void isProxyNotDeployed(String proxyServiceName) throws Exception
Exceptionprotected void deleteInboundEndpoint(String name) throws Exception
Exceptionprotected void deleteInboundEndpointFromName(String name) throws Exception
Exceptionprotected void isProxyDeployed(String proxyServiceName) throws Exception
Exceptionprotected void isEndpointDeployed(String endpointName) throws Exception
Exceptionprotected void isLocalEntryDeployed(String localEntryName) throws Exception
Exceptionprotected void deleteProxyService(String proxyServiceName) throws Exception
Exceptionprotected void deleteApi(String api) throws Exception
api - name of the api to be deleteException - if an exception occurs while deleting the API or checking its existenceprotected void deleteSequence(String sequenceName) throws org.wso2.carbon.sequences.stub.types.SequenceEditorException, RemoteException
org.wso2.carbon.sequences.stub.types.SequenceEditorExceptionRemoteExceptionprotected void addSequence(org.apache.axiom.om.OMElement sequenceConfig)
throws Exception
Exceptionprotected void uploadConnector(String repoLocation, String strFileName) throws MalformedURLException, RemoteException
MalformedURLExceptionRemoteExceptionprotected void updateConnectorStatus(String libQName, String libName, String packageName, String status) throws RemoteException
RemoteExceptionprotected void addImport(String libName, String packageName) throws RemoteException
RemoteExceptionprotected String getImport(String qualifiedName) throws RemoteException
RemoteExceptionprotected org.wso2.carbon.mediation.library.stub.types.carbon.LibraryInfo[] getAllLibraryInfo()
throws RemoteException
RemoteExceptionprotected String[] getAllLibraries() throws RemoteException
RemoteExceptionprotected void deleteImport(String importQualifiedName) throws RemoteException
RemoteExceptionprotected org.wso2.carbon.mediation.library.stub.types.carbon.LibraryInfo getLibraryInfo(String libName, String packageName) throws RemoteException
RemoteExceptionprotected DataHandler downloadLibraryArchive(String fileName) throws RemoteException, org.wso2.carbon.mediation.library.stub.MediationLibraryAdminServiceException
RemoteExceptionorg.wso2.carbon.mediation.library.stub.MediationLibraryAdminServiceExceptionprotected void addEndpoint(org.apache.axiom.om.OMElement endpointConfig)
throws Exception
Exceptionprotected void addLocalEntry(org.apache.axiom.om.OMElement localEntryConfig)
throws Exception
Exceptionprotected void addMessageProcessor(org.apache.axiom.om.OMElement messageProcessorConfig)
throws Exception
Exceptionprotected void addMessageStore(org.apache.axiom.om.OMElement messageStoreConfig)
throws Exception
Exceptionprotected void addSequenceTemplate(org.apache.axiom.om.OMElement sequenceTemplate)
throws Exception
Exceptionprotected void addPriorityExecutor(org.apache.axiom.om.OMElement priorityExecutor)
throws Exception
Exceptionprotected void addScheduledTask(org.apache.axiom.om.OMElement task)
throws Exception
Exceptionprotected void applySecurity(String serviceName, int policyId, String[] userGroups) throws org.wso2.carbon.security.mgt.stub.config.SecurityAdminServiceSecurityConfigExceptionException, RemoteException, InterruptedException
org.wso2.carbon.security.mgt.stub.config.SecurityAdminServiceSecurityConfigExceptionExceptionRemoteExceptionInterruptedExceptionprotected void updateESBRegistry(String resourcePath) throws Exception
Exceptionprotected boolean isRunningOnStratos()
throws XPathExpressionException
XPathExpressionExceptionprotected String getESBResourceLocation()
protected String getBackEndServiceUrl(String serviceName) throws XPathExpressionException
XPathExpressionExceptionprotected void uploadCapp(String appname, DataHandler dataHandler) throws RemoteException
RemoteExceptionprotected org.wso2.carbon.application.mgt.synapse.stub.types.carbon.SynapseApplicationMetadata getSynapseAppData(String appName) throws RemoteException, org.wso2.carbon.application.mgt.synapse.stub.ExceptionException
RemoteExceptionorg.wso2.carbon.application.mgt.synapse.stub.ExceptionExceptionprotected org.apache.axiom.om.OMElement setEndpoints(org.apache.axiom.om.OMElement synapseConfig)
throws XMLStreamException,
XPathExpressionException
protected DataHandler setEndpoints(DataHandler dataHandler) throws XMLStreamException, IOException, XPathExpressionException
protected void verifyProxyServiceExistence(String proxyServiceName) throws RemoteException
RemoteExceptionprotected void verifySequenceExistence(String sequenceName) throws RemoteException, org.wso2.carbon.sequences.stub.types.SequenceEditorException
RemoteExceptionorg.wso2.carbon.sequences.stub.types.SequenceEditorExceptionprotected void verifyAPIExistence(String apiName) throws org.wso2.carbon.rest.api.stub.RestApiAdminAPIException, RemoteException
org.wso2.carbon.rest.api.stub.RestApiAdminAPIExceptionRemoteExceptionprotected void verifyEndpointExistence(String endpointName) throws org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException, RemoteException
org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminExceptionRemoteExceptionprotected void verifyLocalEntryExistence(String localEntry) throws RemoteException, org.wso2.carbon.localentry.stub.types.LocalEntryAdminException
RemoteExceptionorg.wso2.carbon.localentry.stub.types.LocalEntryAdminExceptionprotected void verifyMessageProcessorExistence(String processorName) throws RemoteException
RemoteExceptionprotected void verifyMessageStoreExistence(String storeName) throws RemoteException
RemoteExceptionprotected org.apache.axiom.om.OMElement replaceEndpoints(String relativePathToConfigFile, String serviceName, String port) throws XMLStreamException, FileNotFoundException, XPathExpressionException
protected String login(org.wso2.carbon.automation.engine.context.AutomationContext context) throws IOException, XPathExpressionException, URISyntaxException, SAXException, XMLStreamException, org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException, org.wso2.carbon.integration.common.utils.exceptions.AutomationUtilException
IOExceptionXPathExpressionExceptionURISyntaxExceptionSAXExceptionXMLStreamExceptionorg.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionExceptionorg.wso2.carbon.integration.common.utils.exceptions.AutomationUtilExceptionprotected String getSessionCookie()
protected String[] getUserRole()
Copyright © 2018 WSO2. All rights reserved.