[jboss-cvs] jboss-seam/examples/wiki/src/test/org/jboss/seam/wiki/test/model ...
Christian Bauer
christian at hibernate.org
Thu Dec 20 07:23:06 EST 2007
User: cbauer
Date: 07/12/20 07:23:06
Modified: examples/wiki/src/test/org/jboss/seam/wiki/test/model
DirectoryTests.java
Log:
JBSEAM-1743 - Clipboard for copying/moving of nodes
Revision Changes Path
1.2 +19 -0 jboss-seam/examples/wiki/src/test/org/jboss/seam/wiki/test/model/DirectoryTests.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DirectoryTests.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/test/org/jboss/seam/wiki/test/model/DirectoryTests.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- DirectoryTests.java 19 Dec 2007 04:29:24 -0000 1.1
+++ DirectoryTests.java 20 Dec 2007 12:23:06 -0000 1.2
@@ -40,6 +40,25 @@
}
@Test
+ public void getDirectoryPath() throws Exception {
+ new FacesRequest() {
+
+ protected void invokeApplication() throws Exception {
+ EntityManager em = (EntityManager) getInstance("restrictedEntityManager");
+ WikiDirectory d = (WikiDirectory)
+ em.createQuery("select d from WikiDirectory d where d.id = :id")
+ .setParameter("id", 4l)
+ .getSingleResult();
+ assert d.getName().equals("DDD");
+ assert d.getPath().size() == 3;
+ assert d.getPath().get(0).getId().equals(1l);
+ assert d.getPath().get(1).getId().equals(3l);
+ assert d.getPath().get(2).getId().equals(4l);
+ }
+ }.run();
+ }
+
+ @Test
public void updateDirectoryById() throws Exception {
new FacesRequest() {
More information about the jboss-cvs-commits
mailing list