Search in sources :

Example 11 with RuntimeContainerMock

use of org.talend.components.azurestorage.RuntimeContainerMock 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 12 with RuntimeContainerMock

use of org.talend.components.azurestorage.RuntimeContainerMock 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 13 with RuntimeContainerMock

use of org.talend.components.azurestorage.RuntimeContainerMock 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)

Example 14 with RuntimeContainerMock

use of org.talend.components.azurestorage.RuntimeContainerMock in project components by Talend.

the class AzureStorageQueueRuntimeTest 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.azureStorageQueue = new AzureStorageQueueRuntime() {
    };
}
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 15 with RuntimeContainerMock

use of org.talend.components.azurestorage.RuntimeContainerMock in project components by Talend.

the class AzureStorageTableReaderTest method setUp.

@Before
public void setUp() throws Exception {
    container = new RuntimeContainerMock();
    properties = new TAzureStorageInputTableProperties(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.tableName.setValue("testTable");
    properties.filterExpression.column.setValue(new ArrayList<String>());
    properties.filterExpression.fieldType.setValue(new ArrayList<String>());
    properties.filterExpression.function.setValue(new ArrayList<String>());
    properties.filterExpression.operand.setValue(new ArrayList<String>());
    properties.filterExpression.predicate.setValue(new ArrayList<String>());
    properties.filterExpression.column.getValue().add("PartitionKey");
    properties.filterExpression.fieldType.getValue().add(SupportedFieldType.STRING.name());
    properties.filterExpression.function.getValue().add(Comparison.EQUAL.name());
    properties.filterExpression.operand.getValue().add("Departement");
    properties.filterExpression.predicate.getValue().add(Predicate.AND.name());
    source = new AzureStorageTableSource();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageInputTableProperties(org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)

Aggregations

RuntimeContainerMock (org.talend.components.azurestorage.RuntimeContainerMock)17 TAzureStorageConnectionProperties (org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties)16 Before (org.junit.Before)15 TAzureStorageQueueCreateProperties (org.talend.components.azurestorage.queue.tazurestoragequeuecreate.TAzureStorageQueueCreateProperties)2 TAzureStorageOutputTableProperties (org.talend.components.azurestorage.table.tazurestorageoutputtable.TAzureStorageOutputTableProperties)2 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 TAzureStorageDeleteProperties (org.talend.components.azurestorage.blob.tazurestoragedelete.TAzureStorageDeleteProperties)1 TAzureStorageGetProperties (org.talend.components.azurestorage.blob.tazurestorageget.TAzureStorageGetProperties)1 TAzureStorageListProperties (org.talend.components.azurestorage.blob.tazurestoragelist.TAzureStorageListProperties)1 TAzureStoragePutProperties (org.talend.components.azurestorage.blob.tazurestorageput.TAzureStoragePutProperties)1 TAzureStorageQueueDeleteProperties (org.talend.components.azurestorage.queue.tazurestoragequeuedelete.TAzureStorageQueueDeleteProperties)1 TAzureStorageQueueInputProperties (org.talend.components.azurestorage.queue.tazurestoragequeueinput.TAzureStorageQueueInputProperties)1 TAzureStorageQueueListProperties (org.talend.components.azurestorage.queue.tazurestoragequeuelist.TAzureStorageQueueListProperties)1 TAzureStorageQueuePurgeProperties (org.talend.components.azurestorage.queue.tazurestoragequeuepurge.TAzureStorageQueuePurgeProperties)1 TAzureStorageInputTableProperties (org.talend.components.azurestorage.table.tazurestorageinputtable.TAzureStorageInputTableProperties)1