Search in sources :

Example 16 with TAzureStorageConnectionProperties

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

the class AzureStorageComponentListPropertiesTest method afterFormFinishTable2.

@Test(expected = NoSuchElementException.class)
public void afterFormFinishTable2() throws Exception {
    TAzureStorageConnectionProperties connection = new TAzureStorageConnectionProperties("test");
    connection.setupProperties();
    connection.setupLayout();
    connection.useSharedAccessSignature.setValue(true);
    connection.sharedAccessSignature.setValue("https://talendrd.blob.core.windows.net/?sv=2016-05-31&ss=f&srt=sco&sp=rwdlacup&se=2017-06-07T23:50:05Z&st=2017-05-24T15:50:05Z&spr=https&sig=fakeSASfakeSASfakeSASfakeSASfakeSASfakeSASfakeSASfakeSAS");
    properties.setConnection(connection);
    List<NamedThing> nameWithNumeric = new ArrayList<NamedThing>();
    nameWithNumeric.add(new SimpleNamedThing("2Name_with_numeric2", "2Name_with_numeric2"));
    properties.selectedTableNames.setStoredValue(nameWithNumeric);
    @SuppressWarnings("unused") ValidationResult result = properties.afterFormFinishTable(repo);
}
Also used : SimpleNamedThing(org.talend.daikon.SimpleNamedThing) ArrayList(java.util.ArrayList) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) NamedThing(org.talend.daikon.NamedThing) SimpleNamedThing(org.talend.daikon.SimpleNamedThing) ValidationResult(org.talend.daikon.properties.ValidationResult) Test(org.junit.Test)

Example 17 with TAzureStorageConnectionProperties

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

the class AzureStorageSourceOrSinkTestIT method testInvalidConnection.

@Test(expected = Exception.class)
public void testInvalidConnection() throws Throwable {
    // fail("Not yet implemented");
    AzureStorageSourceOrSink sos = new AzureStorageSourceOrSink();
    TAzureStorageConnectionProperties properties = new TAzureStorageConnectionProperties("tests");
    properties.setupProperties();
    sos.initialize(runtime, properties);
}
Also used : AzureStorageSourceOrSink(org.talend.components.azurestorage.blob.runtime.AzureStorageSourceOrSink) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Test(org.junit.Test)

Example 18 with TAzureStorageConnectionProperties

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

the class AzureStorageQueueCreateRuntimeTest method setup.

@Before
public void setup() throws IOException {
    properties = new TAzureStorageQueueCreateProperties(PROP_ + "Get");
    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.azureStorageQueueCreate = new AzureStorageQueueCreateRuntime();
}
Also used : TAzureStorageQueueCreateProperties(org.talend.components.azurestorage.queue.tazurestoragequeuecreate.TAzureStorageQueueCreateProperties) RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 19 with TAzureStorageConnectionProperties

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

the class AzureStorageTableWriteOperationTest method setUp.

@Before
public void setUp() throws Exception {
    container = new RuntimeContainerMock();
    sink = new AzureStorageTableSink();
    properties = new TAzureStorageOutputTableProperties(PROP_ + "InputTable");
    properties.setupProperties();
    // valid fake 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.dieOnError.setValue(false);
    properties.tableName.setValue("testtable");
    properties.actionOnTable.setValue(ActionOnTable.Create_table_if_does_not_exist);
    properties.actionOnData.setValue(ActionOnData.Insert);
    properties.schema.schema.setValue(TableHelper.getWriteSchema());
    properties.schemaReject.schema.setValue(TableHelper.getRejectSchema());
    properties.partitionKey.setStoredValue("PartitionKey");
    properties.rowKey.setStoredValue("RowKey");
}
Also used : TAzureStorageOutputTableProperties(org.talend.components.azurestorage.table.tazurestorageoutputtable.TAzureStorageOutputTableProperties) RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 20 with TAzureStorageConnectionProperties

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

the class AzureStorageQueueDeleteRuntimeTest method setup.

@Before
public void setup() throws IOException {
    properties = new TAzureStorageQueueDeleteProperties(PROP_ + "Delete");
    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.queueDelete = new AzureStorageQueueDeleteRuntime();
}
Also used : TAzureStorageQueueDeleteProperties(org.talend.components.azurestorage.queue.tazurestoragequeuedelete.TAzureStorageQueueDeleteProperties) RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

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