Author: kono
Date: 2010-08-18 16:38:54 -0700 (Wed, 18 Aug 2010)
New Revision: 21463
Added:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
Removed:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/viewmodel/
Modified:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/CyNetworkViewTest.java
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/CyNodeViewTest.java
Log:
Wrong package name changed to correct one (viewmodel --> view.model).
Copied: core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model (from
rev 21459, core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/viewmodel)
Modified:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/CyNetworkViewTest.java
===================================================================
---
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/viewmodel/CyNetworkViewTest.java
2010-08-18 22:19:34 UTC (rev 21459)
+++
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/CyNetworkViewTest.java
2010-08-18 23:38:54 UTC (rev 21463)
@@ -1,4 +1,4 @@
-package org.cytoscape.viewmodel;
+package org.cytoscape.view.model;
import org.cytoscape.event.CyEventHelper;
import org.cytoscape.event.DummyCyEventHelper;
Modified:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/CyNodeViewTest.java
===================================================================
---
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/viewmodel/CyNodeViewTest.java
2010-08-18 22:19:34 UTC (rev 21459)
+++
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/CyNodeViewTest.java
2010-08-18 23:38:54 UTC (rev 21463)
@@ -1,4 +1,4 @@
-package org.cytoscape.viewmodel;
+package org.cytoscape.view.model;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
Deleted:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
===================================================================
---
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/viewmodel/ITViewModelImpl.java
2010-08-18 22:19:34 UTC (rev 21459)
+++
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
2010-08-18 23:38:54 UTC (rev 21463)
@@ -1,122 +0,0 @@
-package org.cytoscape.viewmodel;
-
-import org.cytoscape.view.model.CyNetworkViewFactory;
-import org.cytoscape.view.model.RootVisualLexicon;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceReference;
-import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests;
-import org.springframework.osgi.util.OsgiStringUtils;
-
-/**
- * Integration test for viewmodel-impl bundle.
- *
- * @author kono
- *
- */
-public class ITViewModelImpl extends AbstractConfigurableBundleCreatorTests {
-
- // Exported services (FROM viewmodel-impl bundle)
- private RootVisualLexicon rootVisualLexicon;
- private CyNetworkViewFactory cyNetworkViewFactory;
-
- // Inject those services to this test (by setter injection)
- public void setRootVisualLexicon(RootVisualLexicon rootVisualLexicon) {
- this.rootVisualLexicon = rootVisualLexicon;
- }
-
- public void setCyNetworkViewFactory(
- CyNetworkViewFactory cyNetworkViewFactory) {
- this.cyNetworkViewFactory = cyNetworkViewFactory;
- }
-
- public void testOsgiPlatformStarts() throws Exception {
- System.out.println("###### Starting Integration Test ######");
- // Make sure bundle context exists.
- assertNotNull(bundleContext);
-
- System.out.println(bundleContext
- .getProperty(Constants.FRAMEWORK_VENDOR));
- System.out.println(bundleContext
- .getProperty(Constants.FRAMEWORK_VERSION));
- System.out.println(bundleContext
-
.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT));
-
- final Bundle[] bundles = bundleContext.getBundles();
-
- Bundle viewModelImplBundle = null;
- for (int i = 0; i < bundles.length; i++) {
- final Bundle bundle = bundles[i];
- final String bundleName =
OsgiStringUtils.nullSafeName(bundle);
- System.out.println(bundleName);
- if (bundleName.equals("org.cytoscape.viewmodel-impl"))
- viewModelImplBundle = bundle;
- ServiceReference[] services =
bundle.getRegisteredServices();
- if (services != null)
- for (ServiceReference ref : services)
- System.out.println("\tService = " +
ref);
- System.out.println("\n");
- }
-
- // Make sure viewmodel-impl bundle is running
- assertNotNull(viewModelImplBundle);
-
- System.out.println("###### ViewModel bundle registered.
######");
- }
-
- public void testServiceReferencesExist() {
- System.out.println("###### Starting Service Reference Tests
######");
- final ServiceReference rootVisualLexiconServiceReference =
bundleContext
-
.getServiceReference(RootVisualLexicon.class.getName());
- assertNotNull(rootVisualLexiconServiceReference);
- Object beanName = rootVisualLexiconServiceReference
-
.getProperty("org.springframework.osgi.bean.name");
- assertEquals("rootVisualLexicon", beanName);
-
- final ServiceReference cyNetworkViewFactoryServiceReference =
bundleContext
-
.getServiceReference(CyNetworkViewFactory.class.getName());
- assertNotNull(cyNetworkViewFactoryServiceReference);
- beanName = cyNetworkViewFactoryServiceReference
-
.getProperty("org.springframework.osgi.bean.name");
- assertEquals("cyNetworkViewFactory", beanName);
-
- System.out.println("###### SR test done! ######");
- }
-
- /**
- * Do very basic tests for injected services. Complete tests for all
methods
- * will be done in the Unit tests.
- *
- */
- public void testInjectedServices() {
- System.out.println("###### Simple tests for injected services
######");
- assertNotNull(rootVisualLexicon);
- assertNotNull(cyNetworkViewFactory);
- System.out.println("###### Injected services pass the tests.
######");
- }
-
- /**
- * Specify Spring DM config file to import registered services by
- * viewmodel-impl bundle.
- *
- */
- @Override
- protected String[] getConfigLocations() {
- return new String[] {
"file:./target/test-classes/META-INF/spring/bundle-context-test.xml" };
- }
-
- /**
- * Import bundles required to run viewmodel-impl bundle.
- */
- @Override
- protected String[] getTestBundlesNames() {
- return new String[] {
- "org.cytoscape, event-api, 1.0-SNAPSHOT",
- "org.cytoscape, event-impl, 1.0-SNAPSHOT",
- "org.cytoscape, model-api, 1.0-SNAPSHOT",
- "org.cytoscape, service-util, 1.0-SNAPSHOT",
- "org.cytoscape, viewmodel-api, 1.0-SNAPSHOT",
- "org.cytoscape, viewmodel-impl, 1.0-SNAPSHOT"
- };
- }
-}
Copied:
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
(from rev 21460,
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/viewmodel/ITViewModelImpl.java)
===================================================================
---
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
(rev 0)
+++
core3/viewmodel-impl/trunk/src/test/java/org/cytoscape/view/model/ITViewModelImpl.java
2010-08-18 23:38:54 UTC (rev 21463)
@@ -0,0 +1,28 @@
+package org.cytoscape.view.model;
+
+import org.cytoscape.integration.AbstractIntegrationTester;
+import org.cytoscape.view.model.CyNetworkViewFactory;
+import org.cytoscape.view.model.RootVisualLexicon;
+
+/**
+ * Integration test for viewmodel-impl bundle.
+ *
+ * @author kono
+ *
+ */
+public class ITViewModelImpl extends AbstractIntegrationTester {
+
+ public ITViewModelImpl() {
+ super( "org.cytoscape.viewmodel-impl",
+ new String[] { "org.cytoscape, event-api, 1.0-SNAPSHOT",
+ "org.cytoscape, event-impl, 1.0-SNAPSHOT",
+ "org.cytoscape, model-api, 1.0-SNAPSHOT",
+ "org.cytoscape, integration-test-support,
1.0-SNAPSHOT",
+ "org.cytoscape, service-util,
1.0-SNAPSHOT",
+ "org.cytoscape, viewmodel-api,
1.0-SNAPSHOT",
+ "org.cytoscape, viewmodel-impl,
1.0-SNAPSHOT", },
+ new String[] { "rootVisualLexicon",
"cyNetworkViewFactory" },
+ new Class[] { RootVisualLexicon.class,
CyNetworkViewFactory.class }
+ );
+ }
+}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.