git://wamblee.org
/
utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now using the new database support functionality.
[utils]
/
system
/
general
/
src
/
test
/
java
/
org
/
wamblee
/
system
/
graph
/
GraphTest.java
diff --git
a/system/general/src/test/java/org/wamblee/system/graph/GraphTest.java
b/system/general/src/test/java/org/wamblee/system/graph/GraphTest.java
index 7a5a87971204255aa1c945af36b5b972fc826a04..675a06bd6c1c7247c713a9b1af79fc85b40afb27 100644
(file)
--- a/
system/general/src/test/java/org/wamblee/system/graph/GraphTest.java
+++ b/
system/general/src/test/java/org/wamblee/system/graph/GraphTest.java
@@
-18,9
+18,10
@@
package org.wamblee.system.graph;
import java.util.Arrays;
import java.util.List;
import java.util.Arrays;
import java.util.List;
-import
org.easymock.classextension.EasyMock
;
+import
static org.mockito.Mockito.*
;
import org.wamblee.test.AssertionUtils;
import org.wamblee.test.AssertionUtils;
+
import junit.framework.TestCase;
public class GraphTest extends TestCase {
import junit.framework.TestCase;
public class GraphTest extends TestCase {
@@
-156,12
+157,13
@@
public class GraphTest extends TestCase {
graph.addNode(x);
graph.addNode(y);
graph.addEdge(e);
graph.addNode(x);
graph.addNode(y);
graph.addEdge(e);
- Visitor visitor = EasyMock.createMock(Visitor.class);
- visitor.visitNode(x);
- visitor.visitNode(y);
- visitor.visitEdge(e);
- EasyMock.replay(visitor);
+ Visitor visitor = mock(Visitor.class);
+
graph.accept(visitor);
graph.accept(visitor);
- EasyMock.verify(visitor);
+ verify(visitor).visitNode(x);
+ verify(visitor).visitNode(y);
+ verify(visitor).visitEdge(e);
+
+ verifyNoMoreInteractions(visitor);
}
}
}
}