org.alfresco.repo.rule
Class RuleServiceImplTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.test.AbstractTransactionalSpringContextTests
                              extended by org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
                                  extended by org.alfresco.util.BaseSpringTest
                                      extended by org.alfresco.repo.rule.BaseRuleTest
                                          extended by org.alfresco.repo.rule.RuleServiceImplTest
All Implemented Interfaces:
junit.framework.Test

public class RuleServiceImplTest
extends BaseRuleTest

Rule service implementation test


Field Summary
 
Fields inherited from class org.alfresco.repo.rule.BaseRuleTest
ACTION_DEF_NAME, ACTION_PROP_NAME_1, ACTION_PROP_VALUE_1, actionService, authenticationComponent, COND_PROP_NAME_1, COND_PROP_VALUE_1, CONDITION_DEF_NAME, configFolder, configService, contentService, DESCRIPTION, nodeRef, nodeService, rootNodeRef, RULE_TYPE_NAME, ruleService, ruleType, testStoreRef, TITLE, transactionService
 
Fields inherited from class org.alfresco.util.BaseSpringTest
sessionFactory
 
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
jdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionDefinition, transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Fields inherited from class org.springframework.test.ConditionalTestCase
logger
 
Constructor Summary
RuleServiceImplTest()
           
 
Method Summary
protected  void onSetUpInTransaction()
          onSetUpInTransaction implementation
 void testAddRule()
          Test addRule
 void testCyclicAsyncRules()
           
 void testCyclicGraphWithInheritedRules()
          Ensure that the rule store can cope with a cyclic node graph
 void testCyclicRules()
           
 void testDeleteSpaceWithExecuteScriptRule()
           
 void testGetRules()
          Test get rules
 void testGetRulesOrder()
          Ensure the rules are retrieved in the correct order
 void testGetRuleType()
          Test get rule type
 void testIgnoreInheritedRules()
           
 void testPermissionsForPropagatedRules_ALF_8408()
           
 void testRemoveAllRules()
           
 void testRemoveRule()
           
 void testRuleDuplication()
          Ensures that rules are not duplicated when inherited
 void testRuleInheritance()
          Tests the rule inheritance within the store, checking that the cache is reset correctly when rules are added and removed.
 void testRulesDisabled()
          Test disabling the rules
 void testRuleServicePermissionsConsumer()
           
 void testRuleServicePermissionsCoordinator()
           
 void testRuleServicePermissionsEditor()
           
 
Methods inherited from class org.alfresco.repo.rule.BaseRuleTest
addRulesAspect, checkRule, createTestRule, createTestRule, createTestRule, onTearDownInTransaction
 
Methods inherited from class org.alfresco.util.BaseSpringTest
flushAndClear, getConfigLocations, getSession, loadContext, setSessionFactory
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpBeforeTransaction, onTearDown, onTearDownAfterTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleServiceImplTest

public RuleServiceImplTest()
Method Detail

onSetUpInTransaction

protected void onSetUpInTransaction()
                             throws java.lang.Exception
Description copied from class: BaseRuleTest
onSetUpInTransaction implementation

Overrides:
onSetUpInTransaction in class BaseRuleTest
Throws:
java.lang.Exception

testGetRuleType

public void testGetRuleType()
Test get rule type


testAddRule

public void testAddRule()
Test addRule


testRemoveRule

public void testRemoveRule()

testRemoveAllRules

public void testRemoveAllRules()

testGetRules

public void testGetRules()
Test get rules


testGetRulesOrder

public void testGetRulesOrder()
Ensure the rules are retrieved in the correct order


testIgnoreInheritedRules

public void testIgnoreInheritedRules()

testRulesDisabled

public void testRulesDisabled()
Test disabling the rules


testRuleServicePermissionsConsumer

public void testRuleServicePermissionsConsumer()

testRuleServicePermissionsEditor

public void testRuleServicePermissionsEditor()

testRuleServicePermissionsCoordinator

public void testRuleServicePermissionsCoordinator()

testRuleInheritance

public void testRuleInheritance()
Tests the rule inheritance within the store, checking that the cache is reset correctly when rules are added and removed.


testCyclicGraphWithInheritedRules

public void testCyclicGraphWithInheritedRules()
                                       throws java.lang.Exception
Ensure that the rule store can cope with a cyclic node graph

Throws:
java.lang.Exception

testRuleDuplication

public void testRuleDuplication()
Ensures that rules are not duplicated when inherited


testCyclicRules

public void testCyclicRules()

testCyclicAsyncRules

public void testCyclicAsyncRules()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testDeleteSpaceWithExecuteScriptRule

public void testDeleteSpaceWithExecuteScriptRule()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testPermissionsForPropagatedRules_ALF_8408

public void testPermissionsForPropagatedRules_ALF_8408()
                                                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.