Author: mes
Date: 2010-09-01 14:13:09 -0700 (Wed, 01 Sep 2010)
New Revision: 21655
Added:
core3/core-task-api/trunk/src/test/
core3/core-task-api/trunk/src/test/java/
core3/core-task-api/trunk/src/test/java/org/
core3/core-task-api/trunk/src/test/java/org/cytoscape/
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractEdgeViewTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkCollectionTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewCollectionTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNodeViewTaskTest.java
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractRowTaskTest.java
Modified:
core3/core-task-api/trunk/pom.xml
Log:
added a bunch of unit tests
Modified: core3/core-task-api/trunk/pom.xml
===================================================================
--- core3/core-task-api/trunk/pom.xml 2010-09-01 18:37:04 UTC (rev 21654)
+++ core3/core-task-api/trunk/pom.xml 2010-09-01 21:13:09 UTC (rev 21655)
@@ -106,6 +106,18 @@
<artifactId>work-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.8.1</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractDataTableTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.model.CyDataTable;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractDataTableTaskTest {
+
+ private class DataTableTask extends AbstractDataTableTask {
+ DataTableTask(CyDataTable tab) { super(tab); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(table);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullDataTable() throws Exception {
+ new DataTableTask(null);
+ }
+
+ @Test
+ public void testGoodDataTable() throws Exception {
+ DataTableTask rt = new DataTableTask( mock(CyDataTable.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractEdgeViewTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractEdgeViewTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractEdgeViewTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,73 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.view.model.View;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.model.CyEdge;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractEdgeViewTaskTest {
+
+ private class EdgeViewTask extends AbstractEdgeViewTask {
+ EdgeViewTask(View<CyEdge> nv, CyNetworkView view) { super(nv,
view); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(edgeView);
+ assertNotNull(netView);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullEdgeView() throws Exception {
+ new EdgeViewTask(null,mock(CyNetworkView.class));
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNetworkView() throws Exception {
+ new EdgeViewTask((View<CyEdge>)mock(View.class),null);
+ }
+
+ @Test
+ public void testGoodEdgeView() throws Exception {
+ EdgeViewTask rt = new
EdgeViewTask((View<CyEdge>)mock(View.class), mock(CyNetworkView.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkCollectionTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkCollectionTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkCollectionTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,67 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.model.CyNetwork;
+import org.cytoscape.work.TaskMonitor;
+
+import java.util.Collection;
+
+public class AbstractNetworkCollectionTaskTest {
+
+ private class NetworkCollectionTask extends
AbstractNetworkCollectionTask {
+ NetworkCollectionTask(Collection<CyNetwork> nets) {
super(nets); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(networks);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNetwork() throws Exception {
+ new NetworkCollectionTask(null);
+ }
+
+ @Test
+ public void testGoodNetworkCollection() throws Exception {
+ NetworkCollectionTask rt = new NetworkCollectionTask(
(Collection<CyNetwork>)mock(Collection.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.model.CyNetwork;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractNetworkTaskTest {
+
+ private class NetworkTask extends AbstractNetworkTask {
+ NetworkTask(CyNetwork view) { super(view); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(net);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNetwork() throws Exception {
+ new NetworkTask(null);
+ }
+
+ @Test
+ public void testGoodNetwork() throws Exception {
+ NetworkTask rt = new NetworkTask( mock(CyNetwork.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewCollectionTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewCollectionTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewCollectionTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,67 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.work.TaskMonitor;
+
+import java.util.Collection;
+
+public class AbstractNetworkViewCollectionTaskTest {
+
+ private class NetworkViewCollectionTask extends
AbstractNetworkViewCollectionTask {
+ NetworkViewCollectionTask(Collection<CyNetworkView> views) {
super(views); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(networkViews);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNetworkView() throws Exception {
+ new NetworkViewCollectionTask(null);
+ }
+
+ @Test
+ public void testGoodNetworkViewCollection() throws Exception {
+ NetworkViewCollectionTask rt = new NetworkViewCollectionTask(
(Collection<CyNetworkView>)mock(Collection.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNetworkViewTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractNetworkViewTaskTest {
+
+ private class NetworkViewTask extends AbstractNetworkViewTask {
+ NetworkViewTask(CyNetworkView view) { super(view); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(view);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNetworkView() throws Exception {
+ new NetworkViewTask(null);
+ }
+
+ @Test
+ public void testGoodNetworkView() throws Exception {
+ NetworkViewTask rt = new NetworkViewTask(
mock(CyNetworkView.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNodeViewTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNodeViewTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractNodeViewTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,73 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.view.model.View;
+import org.cytoscape.view.model.CyNetworkView;
+import org.cytoscape.model.CyNode;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractNodeViewTaskTest {
+
+ private class NodeViewTask extends AbstractNodeViewTask {
+ NodeViewTask(View<CyNode> nv, CyNetworkView view) { super(nv,
view); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(nodeView);
+ assertNotNull(netView);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNodeView() throws Exception {
+ new NodeViewTask(null,mock(CyNetworkView.class));
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullNetworkView() throws Exception {
+ new NodeViewTask((View<CyNode>)mock(View.class),null);
+ }
+
+ @Test
+ public void testGoodNodeView() throws Exception {
+ NodeViewTask rt = new
NodeViewTask((View<CyNode>)mock(View.class), mock(CyNetworkView.class) );
+ rt.run(mock(TaskMonitor.class));
+ }
+}
Added:
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractRowTaskTest.java
===================================================================
---
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractRowTaskTest.java
(rev 0)
+++
core3/core-task-api/trunk/src/test/java/org/cytoscape/task/AbstractRowTaskTest.java
2010-09-01 21:13:09 UTC (rev 21655)
@@ -0,0 +1,65 @@
+/*
+ Copyright (c) 2010, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+
+
+package org.cytoscape.task;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.cytoscape.model.CyRow;
+import org.cytoscape.work.TaskMonitor;
+
+public class AbstractRowTaskTest {
+
+ private class RowTask extends AbstractRowTask {
+ RowTask(CyRow row) { super(row); }
+ public void run(TaskMonitor tm) {
+ assertNotNull(row);
+ }
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullRow() throws Exception {
+ new RowTask(null);
+ }
+
+ @Test
+ public void testGoodRow() throws Exception {
+ RowTask rt = new RowTask(mock(CyRow.class));
+ rt.run(mock(TaskMonitor.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.