mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user