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;
}
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();
}
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();
}
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();
}
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");
}
Aggregations