use of org.talend.daikon.i18n.I18nMessages in project components by Talend.
the class SnowflakeConstantsTest method testI18NConstants.
@Test
public void testI18NConstants() {
I18nMessages i18nMessages = GlobalI18N.getI18nMessageProvider().getI18nMessages(SnowflakeConstants.class);
String incorrectSnowflakeAccoutMessage = i18nMessages.getMessage("error.incorrectAccount");
String connectionSuccessfullMessage = i18nMessages.getMessage("messages.success");
assertFalse(incorrectSnowflakeAccoutMessage.equals("error.incorrectAccount"));
assertFalse(connectionSuccessfullMessage.equals("messages.success"));
}
use of org.talend.daikon.i18n.I18nMessages in project components by Talend.
the class SnowflakeSourceOrSinkTest method testI18NMessages.
@Test
public void testI18NMessages() {
I18nMessages i18nMessages = GlobalI18N.getI18nMessageProvider().getI18nMessages(SnowflakeSourceOrSink.class);
String errorDuringSearchingTable = i18nMessages.getMessage("error.searchingTable");
String tableNotFoundMessage = i18nMessages.getMessage("error.tableNotFound");
String requiredPropertyIsEmptyMessage = i18nMessages.getMessage("error.requiredPropertyIsEmpty");
assertFalse(errorDuringSearchingTable.equals("error.searchingTable"));
assertFalse(tableNotFoundMessage.equals("error.tableNotFound"));
assertFalse(requiredPropertyIsEmptyMessage.equals("error.requiredPropertyIsEmpty"));
}
use of org.talend.daikon.i18n.I18nMessages in project components by Talend.
the class SnowflakeConnectionPropertiesTest method testI18NMessage.
@Test
public void testI18NMessage() {
I18nMessages i18nMessages = GlobalI18N.getI18nMessageProvider().getI18nMessages(SnowflakeConnectionProperties.class);
String connectionSuccessMessage = i18nMessages.getMessage("messages.connectionSuccessful");
Assert.assertFalse(connectionSuccessMessage.equals("messages.connectionSuccessful"));
}
use of org.talend.daikon.i18n.I18nMessages in project components by Talend.
the class ComponentServiceTest method testGetSchema.
@Test
public void testGetSchema() {
TestComponentProperties componentProperties = (TestComponentProperties) getComponentService().getComponentProperties(TestComponentDefinition.COMPONENT_NAME);
Schema aSchema = SchemaBuilder.builder().booleanType();
componentProperties.mainOutput.setValue(aSchema);
Schema schema = getComponentService().getSchema(componentProperties, componentProperties.getAllConnectors().iterator().next(), true);
assertEquals(aSchema, schema);
schema = getComponentService().getSchema(componentProperties, new Connector() {
@Override
public String getDisplayName() {
return null;
}
@Override
public String getTitle() {
return null;
}
@Override
public void setI18nMessageFormatter(I18nMessages i18nMessages) {
}
@Override
public String getI18nMessage(String key, Object... arguments) {
return null;
}
@Override
public String getName() {
return "foo";
}
}, true);
assertNull(schema);
}
use of org.talend.daikon.i18n.I18nMessages in project components by Talend.
the class MarkLogicBulkLoadTest method testI18N.
@Test
public void testI18N() {
I18nMessages i18nMessages = GlobalI18N.getI18nMessageProvider().getI18nMessages(MarkLogicBulkLoad.class);
assertFalse(i18nMessages.getMessage("messages.debug.command").equals("messages.debug.command"));
assertFalse(i18nMessages.getMessage("messages.info.startBulkLoad").equals("messages.info.startBulkLoad"));
assertFalse(i18nMessages.getMessage("messages.info.finishBulkLoad").equals("messages.info.finishBulkLoad"));
}
Aggregations