Search in sources :

Example 11 with UtilityFactory

use of org.knime.core.data.DataValue.UtilityFactory in project knime-core by knime.

the class ExtensibleUtilityFactoryTest method testNoRegisteredRenderers.

/**
 * Tests basic functionality of the extension point.
 */
@Test
public void testNoRegisteredRenderers() {
    ExtensibleUtilityFactory utilityFactory = Test2DataValue.UTILITY;
    assertThat("Wrong utility factory retrieved via data type", DataType.getUtilityFor(Test2DataValue.class), is((UtilityFactory) utilityFactory));
    Collection<DataValueRendererFactory> availableRenderers = utilityFactory.getAvailableRenderers();
    assertThat("Wrong number of available renderers", availableRenderers.size(), is(0));
    assertThat("Unexpected preferred renderer", utilityFactory.getPreferredRenderer(), is(IsNull.nullValue()));
}
Also used : ExtensibleUtilityFactory(org.knime.core.data.ExtensibleUtilityFactory) UtilityFactory(org.knime.core.data.DataValue.UtilityFactory) ExtensibleUtilityFactory(org.knime.core.data.ExtensibleUtilityFactory) Test(org.junit.Test)

Aggregations

UtilityFactory (org.knime.core.data.DataValue.UtilityFactory)11 ExtensibleUtilityFactory (org.knime.core.data.ExtensibleUtilityFactory)5 Test (org.junit.Test)3 Icon (javax.swing.Icon)2 JCheckBox (javax.swing.JCheckBox)2 CollectionDataValue (org.knime.core.data.collection.CollectionDataValue)2 Field (java.lang.reflect.Field)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArrayList (java.util.ArrayList)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 IEclipsePreferences (org.eclipse.core.runtime.preferences.IEclipsePreferences)1 DataColumnSpec (org.knime.core.data.DataColumnSpec)1 DataValue (org.knime.core.data.DataValue)1 DataValueRendererFactory (org.knime.core.data.renderer.DataValueRendererFactory)1 DataValueRendererFamily (org.knime.core.data.renderer.DataValueRendererFamily)1 DefaultDataValueRenderer (org.knime.core.data.renderer.DefaultDataValueRenderer)1 DefaultDataValueRendererFamily (org.knime.core.data.renderer.DefaultDataValueRendererFamily)1 SetOfRendererFamilies (org.knime.core.data.renderer.SetOfRendererFamilies)1 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)1