Point checkin. Hibernate is currently beating me up by not doing

what I expect when trying to determine the concrete type of a polymorphic
type.  Some major surgery seems to be in order.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-05-20 15:34:17 +00:00
parent 72751fdedb
commit 2ee957f5e2
7 changed files with 164 additions and 70 deletions

View File

@@ -17,6 +17,8 @@
package org.alfresco.repo.avm;
import java.util.ArrayList;
import org.alfresco.repo.avm.hibernate.HibernateHelper;
import org.alfresco.repo.avm.impl.AVMServiceImpl;
import org.hibernate.cfg.Configuration;
@@ -56,6 +58,7 @@ public class AVMServiceTest extends TestCase
@Override
protected void tearDown() throws Exception
{
HibernateHelper.Reset();
}
/**
@@ -64,4 +67,43 @@ public class AVMServiceTest extends TestCase
public void testNothing()
{
}
/**
* Test making a simple directory.
*/
public void testCreateDirectory()
{
try
{
fService.createDirectory("main:/", "testdir");
ArrayList<String> toSnapshot = new ArrayList<String>();
toSnapshot.add("main");
fService.createSnapshot(toSnapshot);
}
catch (Exception e)
{
e.printStackTrace(System.err);
fail();
}
}
/**
* Test creating a file.
*/
public void testCreateFile()
{
try
{
testCreateDirectory();
fService.createFile("main:testdir", "testfile");
ArrayList<String> toSnapshot = new ArrayList<String>();
toSnapshot.add("main");
fService.createSnapshot(toSnapshot);
}
catch (Exception e)
{
e.printStackTrace(System.err);
fail();
}
}
}