Author: kono
Date: 2010-09-17 18:48:44 -0700 (Fri, 17 Sep 2010)
New Revision: 21943
Added:
core3/vizmap-api/branches/vp-tree/src/test/java/org/cytoscape/view/vizmap/AbstractVisualStyleFactoryTest.java
Log:
Test for VS factory.
Added:
core3/vizmap-api/branches/vp-tree/src/test/java/org/cytoscape/view/vizmap/AbstractVisualStyleFactoryTest.java
===================================================================
---
core3/vizmap-api/branches/vp-tree/src/test/java/org/cytoscape/view/vizmap/AbstractVisualStyleFactoryTest.java
(rev 0)
+++
core3/vizmap-api/branches/vp-tree/src/test/java/org/cytoscape/view/vizmap/AbstractVisualStyleFactoryTest.java
2010-09-18 01:48:44 UTC (rev 21943)
@@ -0,0 +1,44 @@
+package org.cytoscape.view.vizmap;
+
+
+import static org.junit.Assert.*;
+
+import org.cytoscape.view.model.VisualLexicon;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public abstract class AbstractVisualStyleFactoryTest {
+
+ protected VisualStyleFactory factory;
+
+ protected VisualLexicon lexicon;
+
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testVisualStyleFactory() {
+ assertNotNull(factory);
+ assertNotNull(lexicon);
+
+ final String title = "original style";
+ final VisualStyle style = factory.createVisualStyle(title,
lexicon);
+
+ assertNotNull(style);
+ assertEquals(lexicon, style.getVisualLexicon());
+
+ final VisualStyle copyStyle = factory.createVisualStyle(style);
+ assertNotNull(copyStyle);
+
+ assertEquals(title, copyStyle.getTitle());
+ assertEquals(lexicon, style.getVisualLexicon());
+ }
+
+}
--
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.