@Test public void testCreateExtensionPoint() { try { extensionManager.removeExtensionPoint("extensionPoint1"); extensionManager.createExtensionPoint("extensionPoint1", "test extension point", null); String[] extensionPoints = extensionManager.getExtensionPoints(); assertTrue(contains(extensionPoints, "extensionPoint1")); } catch (Exception e) { assertTrue(e.getMessage(), false); e.printStackTrace(); } }
@Test public void testGetExtensionPoint() { try { extensionManager.removeExtensionPoint("extensionPoint1"); extensionManager.createExtensionPoint("extensionPoint1", "test extension point", null); ExtensionPointDefinition extensionPointDefinition = extensionManager.getExtensionPoint("extensionPoint1"); assertNotNull(extensionPointDefinition); } catch (Exception e) { assertTrue(e.getMessage(), false); e.printStackTrace(); } }
@Test public void testUpdateExtension() { try { extensionManager.removeExtensionPoint("extensionPoint1"); extensionManager.createExtensionPoint("extensionPoint1", "test extension point", null); extensionManager.createExtension("extension1", "extensionPoint1", "test extension", null); ExtensionDefinition extensionDefinition = extensionManager.getExtension("extension1", "extensionPoint1"); assertNotNull(extensionDefinition); assertEquals("test extension", extensionDefinition.getDescription()); extensionManager.updateExtension( "extension1", "extensionPoint1", "test extension updated", null); extensionDefinition = extensionManager.getExtension("extension1", "extensionPoint1"); assertEquals("test extension updated", extensionDefinition.getDescription()); } catch (Exception e) { assertTrue(e.getMessage(), false); e.printStackTrace(); } }