Search in sources :

Example 71 with NamedThing

use of org.talend.daikon.NamedThing in project components by Talend.

the class SnowflakeTablePropertiesTest method testBeforeTableName.

@Test
public void testBeforeTableName() throws Exception {
    List<NamedThing> tableNames = new ArrayList<>();
    tableNames.add(new SimpleNamedThing());
    PowerMockito.mockStatic(SnowflakeSourceOrSink.class);
    Mockito.when(SnowflakeSourceOrSink.getSchemaNames(null, tableProperties.getConnectionProperties())).thenReturn(tableNames);
    Assert.assertEquals(ValidationResult.Result.OK, tableProperties.beforeTableName().getStatus());
    Assert.assertEquals(tableNames.size(), tableProperties.tableName.getPossibleValues().size());
}
Also used : SimpleNamedThing(org.talend.daikon.SimpleNamedThing) ArrayList(java.util.ArrayList) NamedThing(org.talend.daikon.NamedThing) SimpleNamedThing(org.talend.daikon.SimpleNamedThing) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

NamedThing (org.talend.daikon.NamedThing)71 SimpleNamedThing (org.talend.daikon.SimpleNamedThing)34 ArrayList (java.util.ArrayList)33 Test (org.junit.Test)21 Property (org.talend.daikon.properties.property.Property)17 ComponentProperties (org.talend.components.api.properties.ComponentProperties)15 ComponentException (org.talend.components.api.exception.ComponentException)14 Schema (org.apache.avro.Schema)11 SandboxedInstance (org.talend.daikon.sandbox.SandboxedInstance)9 ValidationResult (org.talend.daikon.properties.ValidationResult)8 Form (org.talend.daikon.properties.presentation.Form)8 List (java.util.List)7 IOException (java.io.IOException)6 PresentationItem (org.talend.daikon.properties.PresentationItem)6 Properties (org.talend.daikon.properties.Properties)6 ComponentWizard (org.talend.components.api.wizard.ComponentWizard)5 GenericElementParameter (org.talend.designer.core.generic.model.GenericElementParameter)5 PropertyPathConnector (org.talend.components.api.component.PropertyPathConnector)4 ComponentWizardDefinition (org.talend.components.api.wizard.ComponentWizardDefinition)4 SearchRecordTypeDesc (org.talend.components.netsuite.client.model.SearchRecordTypeDesc)4