Search in sources :

Example 6 with RuntimeContainerMock

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

the class AzureStorageContainerListReaderTest method setUp.

@Before
public void setUp() throws Exception {
    runtimeContainer = new RuntimeContainerMock();
    AzureStorageSource source = new AzureStorageSource();
    TAzureStorageContainerListProperties properties = new TAzureStorageContainerListProperties(PROP_ + "ContainerList");
    properties.connection = new TAzureStorageConnectionProperties(PROP_ + "Connection");
    properties.connection.protocol.setValue(Protocol.HTTP);
    properties.connection.accountName.setValue("fakeAccountName");
    properties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    properties.setupProperties();
    source.initialize(runtimeContainer, properties);
    reader = (AzureStorageContainerListReader) source.createReader(runtimeContainer);
    reader.blobService = blobService;
}
Also used : TAzureStorageContainerListProperties(org.talend.components.azurestorage.blob.tazurestoragecontainerlist.TAzureStorageContainerListProperties) RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 7 with RuntimeContainerMock

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

the class AzureStorageGetRuntimeTest method setup.

@Before
public void setup() throws IOException {
    properties = new TAzureStorageGetProperties(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");
    properties.container.setValue("goog-container-name-1");
    runtimeContainer = new RuntimeContainerMock();
    this.storageGet = new AzureStorageGetRuntime();
    localFolder = FileUtils.createTempDirectory();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStorageGetProperties(org.talend.components.azurestorage.blob.tazurestorageget.TAzureStorageGetProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 8 with RuntimeContainerMock

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

the class AzureStoragePutRuntimeTest method setup.

@Before
public void setup() throws IOException {
    properties = new TAzureStoragePutProperties(PROP_ + "Put");
    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("goog-container-name-1");
    runtimeContainer = new RuntimeContainerMock();
    this.storagePut = new AzureStoragePutRuntime();
    localFolderPath = getClass().getClassLoader().getResource("azurestorage-put").getPath();
}
Also used : RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) TAzureStoragePutProperties(org.talend.components.azurestorage.blob.tazurestorageput.TAzureStoragePutProperties) TAzureStorageConnectionProperties(org.talend.components.azurestorage.tazurestorageconnection.TAzureStorageConnectionProperties) Before(org.junit.Before)

Example 9 with RuntimeContainerMock

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

the class AzureStorageQueueSourceOrSinkTest method setUp.

@Before
public void setUp() throws Exception {
    sos = new AzureStorageQueueSourceOrSink();
    props = new TAzureStorageQueueListProperties("tests");
    props.setupProperties();
    queueInputProperties = new TAzureStorageQueueInputProperties("test");
    queueInputProperties.setupProperties();
    queueInputProperties.connection.accountName.setValue("fakeAccountName");
    queueInputProperties.connection.accountKey.setValue("fakeAccountKey=ANBHFYRJJFHRIKKJFU");
    runtimeContainer = new RuntimeContainerMock();
}
Also used : TAzureStorageQueueListProperties(org.talend.components.azurestorage.queue.tazurestoragequeuelist.TAzureStorageQueueListProperties) TAzureStorageQueueInputProperties(org.talend.components.azurestorage.queue.tazurestoragequeueinput.TAzureStorageQueueInputProperties) RuntimeContainerMock(org.talend.components.azurestorage.RuntimeContainerMock) Before(org.junit.Before)

Example 10 with RuntimeContainerMock

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

the class AzureStorageTableWriterTest 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(TableHelper.generateRandomTableName());
    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)

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