Search in sources :

Example 76 with WButton

use of com.github.bordertech.wcomponents.WButton in project wcomponents by BorderTech.

the class UIRegistryClassLoaderImpl_Test method testGetUINotRegisteredWComponent.

/**
 * Test getUI - nothing registered - but WComponent creatable from key.
 */
@Test
public void testGetUINotRegisteredWComponent() {
    final String key = "com.github.bordertech.wcomponents.WButton";
    UIRegistryClassLoaderImpl reg = new UIRegistryClassLoaderImpl();
    WComponent result = reg.getUI(key);
    Assert.assertTrue("should return an instantiated WComponent", result instanceof WButton);
    Assert.assertTrue("the WComponent should be in the registry", reg.isRegistered(key));
    Assert.assertTrue("the WComponent should be locked", result.isLocked());
}
Also used : WComponent(com.github.bordertech.wcomponents.WComponent) DefaultWComponent(com.github.bordertech.wcomponents.DefaultWComponent) WButton(com.github.bordertech.wcomponents.WButton) Test(org.junit.Test)

Aggregations

WButton (com.github.bordertech.wcomponents.WButton)76 Test (org.junit.Test)39 ActionEvent (com.github.bordertech.wcomponents.ActionEvent)25 Action (com.github.bordertech.wcomponents.Action)20 WAjaxControl (com.github.bordertech.wcomponents.WAjaxControl)18 WTextField (com.github.bordertech.wcomponents.WTextField)17 WHeading (com.github.bordertech.wcomponents.WHeading)16 WContainer (com.github.bordertech.wcomponents.WContainer)14 WPanel (com.github.bordertech.wcomponents.WPanel)13 WFieldLayout (com.github.bordertech.wcomponents.WFieldLayout)11 ValidatingAction (com.github.bordertech.wcomponents.validation.ValidatingAction)10 WLabel (com.github.bordertech.wcomponents.WLabel)9 WTableColumn (com.github.bordertech.wcomponents.WTableColumn)8 UIContext (com.github.bordertech.wcomponents.UIContext)7 ExplanatoryText (com.github.bordertech.wcomponents.examples.common.ExplanatoryText)7 WText (com.github.bordertech.wcomponents.WText)6 WDataTable (com.github.bordertech.wcomponents.WDataTable)5 WFieldSet (com.github.bordertech.wcomponents.WFieldSet)5 WTable (com.github.bordertech.wcomponents.WTable)5 AdapterBasicTableModel (com.github.bordertech.wcomponents.AdapterBasicTableModel)4