Search in sources :

Example 1 with TAzureStorageConnectionProperties

use of org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties in project components by Talend.

the class AzureStorageContainerExistRuntimeTest method setup.

@Before
public void setup() {
    properties = new TAzureStorageContainerExistProperties(PROP_ + "ExistContainer");
    properties.setupProperties();
    // valid connection
    properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
    properties.connection.protocol.setValue(Protocol.HTTP);
    properties.connection.accountName.setValue("fakeAccountName");
    properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    runtimeContainer = new RuntimeContainerMock();
    this.existContainer = new AzureStorageContainerExistRuntime();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageContainerExistProperties(org.talend.components.azurestorage.blob.tazurestoragecontainerexist.TAzureStorageContainerExistProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 2 with TAzureStorageConnectionProperties

use of org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties in project components by Talend.

the class AzureStorageDeleteRuntimeTest method setup.

@Before
public void setup() {
    properties = new TAzureStorageDeleteProperties(PROP_ + "DeleteBlock");
    properties.setupProperties();
    // valid connection
    properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
    properties.connection.protocol.setValue(Protocol.HTTP);
    properties.connection.accountName.setValue("fakeAccountName");
    properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    properties.container.setValue("valide-container-name-1");
    runtimeContainer = new RuntimeContainerMock();
    this.deleteBlock = new AzureStorageDeleteRuntime();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) TAzureStorageDeleteProperties(org.talend.components.azurestorage.blob.tazurestoragedelete.TAzureStorageDeleteProperties) Before(org.junit.Before)

Example 3 with TAzureStorageConnectionProperties

use of org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties in project components by Talend.

the class AzureStorageQueueComponentsTest method getConnectionProperties.

/**
 * @see org.talend.components.azurestorage.queue.AzureStorageQueueProperties#getConnectionProperties()
 */
@Test
public void getConnectionProperties() {
    TAzureStorageConnectionProperties connectionproperties = props.getConnectionProperties();
    assertNotNull("connectionproperties cannot be null", connectionproperties);
}
Also used : TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Test(org.junit.Test)

Example 4 with TAzureStorageConnectionProperties

use of org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties in project components by Talend.

the class AzureStorageQueuePurgeRuntimeTest method setup.

@Before
public void setup() throws IOException {
    properties = new TAzureStorageQueuePurgeProperties(PROP_ + "Purge");
    properties.setupProperties();
    // valid connection
    properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
    properties.connection.protocol.setValue(Protocol.HTTP);
    properties.connection.accountName.setValue("fakeAccountName");
    properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    runtimeContainer = new RuntimeContainerMock();
    this.azureStorageQueuePurge = new AzureStorageQueuePurgeRuntime();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageQueuePurgeProperties(org.talend.components.azurestorage.queue.tazurestoragequeuepurge.TAzureStorageQueuePurgeProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 5 with TAzureStorageConnectionProperties

use of org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties in project components by Talend.

the class AzureStorageRuntimeTest method testInitializeValidReferencedConnection.

@Test
public void testInitializeValidReferencedConnection() {
    // Init the referenced connection
    TAzureStorageConnectionProperties referenced = new TAzureStorageConnectionProperties("sharedConnection");
    referenced.setupProperties();
    referenced.accountName.setValue("fakeAccountName");
    referenced.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    // Add referenced connection to the runtime container
    runtimeContainer.setComponentData("shared-connection", AzureStorageRuntime.KEY_CONNECTION_PROPERTIES, referenced);
    // reference connection by id
    properties.referencedComponent.componentInstanceId = new StringProperty("connection").setValue("shared-connection");
    // init and test
    ValidationResult validationResult = this.azureStorageRuntime.initialize(runtimeContainer, properties);
    assertEquals(ValidationResult.OK.getStatus(), validationResult.getStatus());
    assertNotNull(azureStorageRuntime.getConnectionProperties());
}
Also used : StringProperty(org.talend.daikon.properties.property.StringProperty) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) ValidationResult(org.talend.daikon.properties.ValidationResult) Test(org.junit.Test)

Aggregations

TAzureStorageConnectionProperties (org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)27 RuntimeContainerMock (org.talend.components.azurestorage.RuntimeContainerMock)16 Before (org.junit.Before)14 Test (org.junit.Test)7 ValidationResult (org.talend.daikon.properties.ValidationResult)3 ArrayList (java.util.ArrayList)2 Matcher (java.util.regex.Matcher)2 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)2 TAzureStorageQueueCreateProperties (org.talend.components.azurestorage.queue.tazurestoragequeuecreate.TAzureStorageQueueCreateProperties)2 TAzureStorageOutputTableProperties (org.talend.components.azurestorage.table.tazurestorageoutputtable.TAzureStorageOutputTableProperties)2 NamedThing (org.talend.daikon.NamedThing)2 Form (org.talend.daikon.properties.presentation.Form)2 ComponentWizardDefinition (org.talend.components.api.wizard.ComponentWizardDefinition)1 WizardNameComparator (org.talend.components.api.wizard.WizardNameComparator)1 AzureStorageProvideConnectionProperties (org.talend.components.azurestorage.AzureStorageProvideConnectionProperties)1 AzureStorageSourceOrSink (org.talend.components.azurestorage.blob.runtime.AzureStorageSourceOrSink)1 TAzureStorageContainerCreateProperties (org.talend.components.azurestorage.blob.tazurestoragecontainercreate.TAzureStorageContainerCreateProperties)1 TAzureStorageContainerDeleteProperties (org.talend.components.azurestorage.blob.tazurestoragecontainerdelete.TAzureStorageContainerDeleteProperties)1 TAzureStorageContainerExistProperties (org.talend.components.azurestorage.blob.tazurestoragecontainerexist.TAzureStorageContainerExistProperties)1 TAzureStorageContainerListProperties (org.talend.components.azurestorage.blob.tazurestoragecontainerlist.TAzureStorageContainerListProperties)1