public abstract class RuleManagementBaseTest extends KRMSTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode| Modifier and Type | Field and Description | 
|---|---|
| protected ActionBoService | actionBoService | 
| protected AgendaBoService | agendaBoService | 
| protected BusinessObjectService | businessObjectService | 
| protected String | CLASS_DISCRIMINATOR | 
| protected ContextBoService | contextRepository | 
| protected FunctionBoServiceImpl | functionBoService | 
| protected KrmsAttributeDefinitionService | krmsAttributeDefinitionService | 
| protected KrmsTypeRepositoryService | krmsTypeRepository | 
| protected RuleBoService | ruleBoService | 
| protected RuleManagementService | ruleManagementService | 
| protected TermBoService | termBoService | 
dirtyLOG, moduleNameDEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycleslog, method| Constructor and Description | 
|---|
| RuleManagementBaseTest() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected AgendaDefinition.Builder | buildComplexAgenda(RuleManagementBaseTestObjectNames names) | 
| protected ActionDefinition | buildTestActionDefinition(String actionId,
                                                  String actionName,
                                                  String actionDescr,
                                                  int actionSequence,
                                                  String ruleId,
                                                  String namespace)buildTestActionDefinition creates Actions in the database for testing | 
| protected ActionDefinition | buildTestActionDefinition(String actionId,
                                                  String actionName,
                                                  String actionDescr,
                                                  int actionSequence,
                                                  String ruleId,
                                                  String namespace,
                                                  Map<String,String> attributes)buildTestActionDefinition creates Actions in the database for testing | 
| protected AgendaItemDefinition | buildTestAgendaItemDefinition(String agendaItemId,
                                                          String agendaId,
                                                          String ruleId)buildTestAgendaItemDefinition will build aAgendaItemDefinition for testing | 
| protected ContextDefinition | buildTestContext(String objectDiscriminator)Used to build a ContextDefinition in the database for testing. | 
| protected NaturalLanguageUsage | buildTestNaturalLanguageUsage(String namespace,
                                                          String nlUsageName)Used to build a NaturalLanguageUsage entry in the database for testing. | 
| protected RuleDefinition | buildTestRuleDefinition(String namespace,
                                              String objectDiscriminator)buildTestRuleDefinition will create a RuleDefinition entry in the database | 
| protected AgendaDefinition.Builder | createComplexAgenda(String namespace,
                                      String namespaceType,
                                      RuleManagementBaseTestObjectNames names)createComplexAgenda creates a "complex" agenda object in the database for testing
   Structure of the created agenda is as shown here. | 
| protected KrmsTypeDefinition | createKrmsActionTypeDefinition(String nameSpace) | 
| protected KrmsTypeDefinition | createKrmsTypeDefinition(String typeId,
                                                String nameSpace,
                                                String typeName,
                                                String serviceName)createKrmsTypeDefinition | 
| protected KrmsTypeDefinition | createKrmsTypeDefinition(String typeId,
                                                String nameSpace,
                                                String typeName,
                                                String serviceName,
                                                List<KrmsTypeAttribute.Builder> typeAttributes)createKrmsTypeDefinition | 
| protected ReferenceObjectBinding.Builder | createReferenceObjectBinding(String collectionName,
                                                        String krmsObjectId,
                                                        String krmsDiscriminatorType,
                                                        String namespace,
                                                        String referenceObjectId,
                                                        String referenceDiscriminatorType,
                                                        boolean active)createReferenceObjectBinding create a ReferenceObjectBinding entry in the database for testing | 
| protected AgendaDefinition | createTestAgenda(String objectDiscriminator)Creates a test agenda setting the createAttributes flag to false | 
| protected AgendaDefinition | createTestAgenda(String objectDiscriminator,
                                boolean createAttributes)createTestAgenda creates a Agenda set of entries in the database for testing
       Context ("ContextId0", "Namespace0", "ContextName0")
       Agenda  ("AgendaId0", "AgendaName0")
          AgendaItem ("AI0")
              Rule ("RuleId0")
      where 0 represents a discriminator value | 
| protected PropositionDefinition | createTestCompoundProposition(RuleManagementBaseTestObjectNames t0)createTestCompoundProposition Create a complex Compound Proposition entry in the database
     // **************************
     // Compound Proposition (True if Account is 54321 and Occasion is either a Conference or Training)
     // ***************************
     //  C1_compound_proposition            "COMPOUND" "S1_simple_proposition"  "S2_simple_proposition"   "&"
     //      S1_simple_proposition          "SIMPLE"   "Account"                "54321"                   "="
     //      S2_simple_proposition          "SIMPLE"   "Occasion"               "Conference"              "=" | 
| protected KrmsAttributeDefinition | createTestKrmsAttribute(String id,
                                              String name,
                                              String namespace)createTestKrmsAttribute create KrmsAttribute in the database | 
| protected NaturalLanguageTemplate | createTestNaturalLanguageTemplate(String namespace,
                                                                  String langCode,
                                                                  String nlObjectName,
                                                                  String template)Used to create a NaturalLanguageTemplate in the database for testing. | 
| protected NaturalLanguageTemplate | createTestNaturalLanguageTemplate(String namespace,
                                                                  String langCode,
                                                                  String nlObjectName,
                                                                  String template,
                                                                  String nlUsage)Used to create a NaturalLanguageTemplate in the database for testing. | 
| protected PropositionDefinition | createTestPropositionForRule(String objectDiscriminator)createTestPropositionForRule will create a PropositionDefinition entry in the database for test purposes
    The form of the Proposition is   propId_simple_proposition   "SIMPLE"   "TSI_" + propId  "ABC"  "=" | 
| protected PropositionDefinition | createTestPropositionForTranslation(String objectDiscriminator,
                                                                      String namespace,
                                                                      String typeName)createTestPropositionForTranslation | 
| protected ReferenceObjectBinding.Builder | createTestReferenceObjectBinding(String objectDiscriminator)createTestReferenceObjectBinding creates a ReferenceObjectBinding entry in the database for testing | 
| protected PropositionDefinition | createTestSimpleProposition(String namespace,
                                                      String propId,
                                                      String termSpecId,
                                                      String propConstant,
                                                      String propOperator,
                                                      String termSpecType,
                                                      String ruleId,
                                                      String termSpecDescr)createTestSimpleProposition creates a SIMPLE PropositionDefinition set of entries in the database | 
| protected TermSpecificationDefinition | createTestTermSpecification(String termSpecId,
                                                      String termSpecName,
                                                      String namespace,
                                                      String type,
                                                      String termSpecDescr)createTestTermSpecification | 
| protected List<String> | getPerTestTablesNotToClear()Setting it up so that KRMS tables are not reset between test methods to make it run much faster | 
| void | setClassDiscriminator()Extending test classes can override setClassDiscriminator method and set a unique value for the class
   The override method should be called @before tests to ensure a unique discriminator for the class
  Test object naming is comprised of class, test and object uniqueness discriminators. | 
| void | setup() | 
getLoadApplicationLifecycle, getModuleName, getPerTestTablesToClear, getSuiteLifecycles, loadSuiteTestDatagetClearDbPerTestLifecycles, getMode, getPerTestLifecycles, getRollbackClearDbPerTestLifecycles, getRollbackTestLifecycles, setUpgetKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestDataconfigureLogging, dumpMemory, getBaseDir, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles, tearDowngetName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethodprotected RuleManagementService ruleManagementService
protected TermBoService termBoService
protected ContextBoService contextRepository
protected KrmsTypeRepositoryService krmsTypeRepository
protected RuleBoService ruleBoService
protected AgendaBoService agendaBoService
protected ActionBoService actionBoService
protected FunctionBoServiceImpl functionBoService
protected KrmsAttributeDefinitionService krmsAttributeDefinitionService
protected BusinessObjectService businessObjectService
protected String CLASS_DISCRIMINATOR
public RuleManagementBaseTest()
public void setup()
public void setClassDiscriminator()
protected List<String> getPerTestTablesNotToClear()
getPerTestTablesNotToClear in class KRMSTestCaseprotected RuleDefinition buildTestRuleDefinition(String namespace, String objectDiscriminator)
namespace - objectDiscriminator - RuleDefinitionprotected AgendaItemDefinition buildTestAgendaItemDefinition(String agendaItemId, String agendaId, String ruleId)
agendaItemId - agendaId - ruleId - AgendaItemDefinitionprotected ActionDefinition buildTestActionDefinition(String actionId, String actionName, String actionDescr, int actionSequence, String ruleId, String namespace)
actionId - actionName - actionDescr - actionSequence - ruleId - namespace - ActionDefinitionprotected ActionDefinition buildTestActionDefinition(String actionId, String actionName, String actionDescr, int actionSequence, String ruleId, String namespace, Map<String,String> attributes)
actionId - actionName - actionDescr - actionSequence - ruleId - namespace - attributes - ActionDefinitionprotected PropositionDefinition createTestPropositionForRule(String objectDiscriminator)
objectDiscriminator - PropositionDefinitionprotected PropositionDefinition createTestPropositionForTranslation(String objectDiscriminator, String namespace, String typeName)
objectDiscriminator - namespace - typeId - PropositionDefinitionprotected PropositionDefinition createTestSimpleProposition(String namespace, String propId, String termSpecId, String propConstant, String propOperator, String termSpecType, String ruleId, String termSpecDescr)
namespace - of the proposition typepropId - termSpecId - propConstant - propOperator - termSpecType - ruleId - termSpecDescr - PropositionDefinitionprotected TermSpecificationDefinition createTestTermSpecification(String termSpecId, String termSpecName, String namespace, String type, String termSpecDescr)
termSpecId - termSpecName - namespace - type - termSpecDescr - TermSpecificationDefinitionprotected KrmsTypeDefinition createKrmsTypeDefinition(String typeId, String nameSpace, String typeName, String serviceName, List<KrmsTypeAttribute.Builder> typeAttributes)
typeId - nameSpace - typeName - serviceName - typeAttributes - KrmsTypeDefinitionprotected KrmsTypeDefinition createKrmsTypeDefinition(String typeId, String nameSpace, String typeName, String serviceName)
typeId - nameSpace - typeName - serviceName - KrmsTypeDefinitionprotected AgendaDefinition createTestAgenda(String objectDiscriminator)
createTestAgenda(String, boolean)protected AgendaDefinition createTestAgenda(String objectDiscriminator, boolean createAttributes)
objectDiscriminator - createAttributes - flag to have an attribute definition, a type attribute and an agenda attribute createdAgendaDefinition.Builderprotected AgendaDefinition.Builder buildComplexAgenda(RuleManagementBaseTestObjectNames names)
protected AgendaDefinition.Builder createComplexAgenda(String namespace, String namespaceType, RuleManagementBaseTestObjectNames names)
namespace - of the KRMS Agenda to be creatednamespaceType - of the namepace passed (Namespace will be created if it does not exist.){@link - RuleManagementBaseTestObjectNames}  Unique discriminator names to base created Agenda uponAgendaDefinition.Builder populated from the built agendaprotected ReferenceObjectBinding.Builder createTestReferenceObjectBinding(String objectDiscriminator)
objectDiscriminator - ReferenceObjectBinding.Builderprotected ReferenceObjectBinding.Builder createReferenceObjectBinding(String collectionName, String krmsObjectId, String krmsDiscriminatorType, String namespace, String referenceObjectId, String referenceDiscriminatorType, boolean active)
collectionName - krmsObjectId - krmsDiscriminatorType - namespace - referenceObjectId - referenceDiscriminatorType - active - ReferenceObjectBinding.Builderprotected NaturalLanguageTemplate createTestNaturalLanguageTemplate(String namespace, String langCode, String nlObjectName, String template)
namespace - of the KRMS Type which may be createdlangCode - The two character code of applicable languagenlObjectName - Seed value to create unique Template and Usage recordstemplate - The text of the template for the Template recordNaturalLanguageTemplate for the created Templateprotected NaturalLanguageTemplate createTestNaturalLanguageTemplate(String namespace, String langCode, String nlObjectName, String template, String nlUsage)
namespace - of the KRMS Type which may be createdlangCode - The two character code of applicable languagenlObjectName - Seed value to create unique Template and Usage recordstemplate - The text of the template for the Template recordnlUsage - NaturalLanguateUsageId for the Template recordNaturalLanguageTemplate for the created Templateprotected KrmsAttributeDefinition createTestKrmsAttribute(String id, String name, String namespace)
id - name - namespace - KrmsAttributeDefinitionprotected NaturalLanguageUsage buildTestNaturalLanguageUsage(String namespace, String nlUsageName)
namespace - will be used as namespace namenlUsageName - is the name of the NaturalLanguageUsage to be createNaturalLanguageUsageprotected ContextDefinition buildTestContext(String objectDiscriminator)
objectDiscriminator - is a value use to create a unique test ContextContextDefinition for the created Templateprotected PropositionDefinition createTestCompoundProposition(RuleManagementBaseTestObjectNames t0)
t0 - protected KrmsTypeDefinition createKrmsActionTypeDefinition(String nameSpace)
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.