1 package org
.argeo
.slc
.hibernate
.structure
.tree
;
3 import org
.argeo
.slc
.core
.structure
.tree
.TreeSPath
;
4 import org
.argeo
.slc
.dao
.structure
.tree
.TreeSPathDao
;
5 import org
.argeo
.slc
.unit
.AbstractSpringTestCase
;
7 public class TreeSPathDaoHibernateTest
extends AbstractSpringTestCase
{
9 public void testCreate() {
10 TreeSPathDao treeSPathDao
= getBean(TreeSPathDao
.class);
12 String pathParentStr
= "/root/testParent";
13 String pathStr
= pathParentStr
+ "/test";
14 TreeSPath path
= TreeSPath
.parseToCreatePath(pathStr
);
15 treeSPathDao
.create(path
);
17 TreeSPath pathChild
= treeSPathDao
.getTreeSPath(pathStr
);
18 assertEquals(path
, pathChild
);
20 TreeSPath pathParent
= treeSPathDao
.getTreeSPath(pathParentStr
);
21 assertEquals(path
.getParent(), pathParent
);
25 protected String
getApplicationContextLocation() {
26 return "org/argeo/slc/hibernate/applicationContext.xml";