mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Audit config, XSD and write-persistence tests
- Audit paths can now use mixed case (after alf_prop_string_value enhancements) - Pluggable data conversion when pushing values into persistence - Relaxed XSD to allow mixed-case key values - Regex checking of paths and names when building strings git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15976 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -36,6 +36,8 @@ import org.alfresco.repo.audit.model.AuditApplication;
|
||||
import org.alfresco.repo.audit.model.AuditModelException;
|
||||
import org.alfresco.repo.audit.model.AuditModelRegistry;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
@@ -52,6 +54,7 @@ public class AuditBootstrapTest extends TestCase
|
||||
private static final String APPLICATION_TEST = "Alfresco Test";
|
||||
|
||||
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
||||
private static final Log logger = LogFactory.getLog(AuditBootstrapTest.class);
|
||||
|
||||
private AuditModelRegistry auditModelRegistry;
|
||||
|
||||
@@ -83,6 +86,7 @@ public class AuditBootstrapTest extends TestCase
|
||||
catch (AuditModelException e)
|
||||
{
|
||||
// Expected
|
||||
logger.error("Expected AuditModelException: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +115,11 @@ public class AuditBootstrapTest extends TestCase
|
||||
loadBadModel("classpath:alfresco/audit/alfresco-audit-test-bad-05.xml");
|
||||
}
|
||||
|
||||
public void testModelLoading_BadGeneratorRegisteredName() throws Exception
|
||||
{
|
||||
loadBadModel("classpath:alfresco/audit/alfresco-audit-test-bad-06.xml");
|
||||
}
|
||||
|
||||
public void testGetModelId()
|
||||
{
|
||||
Long repoId = auditModelRegistry.getAuditModelId(APPLICATION_TEST);
|
||||
|
Reference in New Issue
Block a user