Parser Specification Converter
ParserSpecificationConverter
Converts a specification object into a decision table model. It takes a loaded specification table and converts it.
Kind: global class
- ParserSpecificationConverter
- .convert(specification) ⇒
object - ._createTestcases(table, rowIdObjects, secDataObject)
- ._createPrimaryDataSection(specification, table) ⇒
array - ._createFieldSubSection(section, fieldName, classes) ⇒
object - ._getClassesForRules(specification, table, fieldData, fieldRules) ⇒
object - ._createExecutionMultirowSection(table)
- ._createSeveritySection(specification, table)
- ._createSecondaryDataSection(specification, table) ⇒
object - ._createSummarySection(table)
- .convert(specification) ⇒
parserSpecificationConverter.convert(specification) ⇒ object
Do the conversion
Kind: instance method of ParserSpecificationConverter
Returns: object - table The created decision table model
| Param | Type | Description |
|---|---|---|
| specification | object | The specification object |
parserSpecificationConverter._createTestcases(table, rowIdObjects, secDataObject)
Creates the default testcases for this decision table
Kind: instance method of ParserSpecificationConverter
| Param | Type | Description |
|---|---|---|
| table | object | The decision table model |
| rowIdObjects | array | An array with all the primary data rowIdObjects |
| secDataObject | object | The secondary rowidObjewct |
parserSpecificationConverter._createPrimaryDataSection(specification, table) ⇒ array
Creates the primary data section and returns an array of rowIdObjects
Kind: instance method of ParserSpecificationConverter
Returns: array - rowIdObjects an array of rowIdObjects
| Param | Type | Description |
|---|---|---|
| specification | object | The specification object |
| table | object | The decision table model |
parserSpecificationConverter._createFieldSubSection(section, fieldName, classes) ⇒ object
Create one field of the primary data section. Also adds the rowId to the class. Returns an object of the following format: obj = { valid : [rowIds] error : [rowIds] }
Kind: instance method of ParserSpecificationConverter
Returns: object - rowIdObj The object containing all the rowIds by there type
| Param | Type | Description |
|---|---|---|
| section | object | The primary data field section |
| fieldName | string | The name of the field |
| classes | object | The equivalenceClasses for this field |
parserSpecificationConverter._getClassesForRules(specification, table, fieldData, fieldRules) ⇒ object
Create all the equivalenceClasses for one field
Kind: instance method of ParserSpecificationConverter
Returns: object - classes The created equivalenceClasses for this field
| Param | Type | Description |
|---|---|---|
| specification | object | The specification object. Only the Rules description is neded |
| table | object | The decision table model |
| fieldData | object | The field data from the specification model |
| fieldRules | object | All the rules for this field |
parserSpecificationConverter._createExecutionMultirowSection(table)
Creates a multirow section which defines if a testcase should be executed or is testdata only
Kind: instance method of ParserSpecificationConverter
| Param | Type | Description |
|---|---|---|
| table | object | The decision table model |
parserSpecificationConverter._createSeveritySection(specification, table)
Creates a multirow section for the serverities
Kind: instance method of ParserSpecificationConverter
| Param | Type | Description |
|---|---|---|
| specification | object | The specification object |
| table | object | The decision table model |
parserSpecificationConverter._createSecondaryDataSection(specification, table) ⇒ object
Creates a secondary data section if the specification has a primary key rule. Adds two fields to it Returns an object of the following format: rowIdObj = { valid : [rowIds] error : [rowIds] }
Kind: instance method of ParserSpecificationConverter
Returns: object - rowIdObj An object with the rowIds
| Param | Type | Description |
|---|---|---|
| specification | object | The specification object |
| table | object | The decision table model |
parserSpecificationConverter._createSummarySection(table)
Creates the summary section for this table
Kind: instance method of ParserSpecificationConverter
| Param | Type | Description |
|---|---|---|
| table | object | The decision table model |