import { FilterInterface, MetaTable, MetaTestcase, TestcaseDefinitionInterface, TestcaseDirectivesInterface } from '../model/index.js'; import { LoggerInterface } from '../logger/index.js'; import { TableDecisionInterface } from './interface/TableDecisionInterface.js'; import { SectionErrorInterface, SectionInterface } from './interface/SectionInterface.js'; export interface TestcaseDefinitionDecisionOptions { /** Some meta information for this test case */ tableMeta: MetaTable; /** The name of the test case */ testcaseName: string; /** Defines how often this test case should be created. Any number greater than 0 */ multiplicity?: number; /** Should this test case be executed or is it only for a reference */ execute?: boolean; /** A back reference to the table containing this test case */ table: TableDecisionInterface; /** * The data for this testcase. * In case of a decision table, a test case is a column. All the data in this * column is stored by an identifier. The identifier is a value in the row. */ data: Record; /** The logger for this model */ logger: LoggerInterface; } /** * A test case is one column in the test case part. This is the implementation for the decision table. */ export declare class TestcaseDefinitionDecision implements TestcaseDefinitionInterface { /** The id of this test case. This could be any unique value */ id: string; /** Some meta information for this test case */ tableMeta: MetaTable; /** The name of the test case */ testcaseName: string; /** Defines how often this test case should be created. Any number greater than 0 */ multiplicity: number; /** Should this test case be executed or is it only for a reference */ execute: boolean; /** This means that a test case should not be executed if a referenced test case has this set to true */ neverExecute: boolean; /** * The data for this testcase. * In case of a decision table, a test case is a column. All the data in this * column is stored by an identifier. The identifier is a value in the row. */ data: Record; /** A back reference to the table containing this test case */ table: TableDecisionInterface; /** Defines if this testcase is included into the completness computation */ isPartOfCompletion: boolean; /** The logger for this model */ logger: LoggerInterface; constructor(opts: TestcaseDefinitionDecisionOptions); get testcaseMeta(): MetaTestcase; /** * Clone the current testcase definition. * @returns A clone of this test case definition. */ clone(): TestcaseDefinitionDecision; /** * Returns all the tag values found in this test case * @returns An Array with all the found tag values */ createTags(): string[]; /** * Returns all the filter found in this test case * @returns An Array with all the found filter */ createFilter(): FilterInterface[]; /** * Returns a list of generator names which should not be executed * @returns An Array with alle the generator names to be switched off for this test case */ createGeneratorSwitches(): string[]; /** * Checks if the given string contains a valid true value * @param val - The expression to check * @returns TRUE if the value is a valid boolean true value. */ private isTrue; /** * Create all the directives for this testcase definition * @returns An object with all the directives by there type */ createDirectives(): TestcaseDirectivesInterface; /** * Gets the generator command for a FieldSubSection * @param subSection - The FieldSubSection * @returns The generator command from the sub section */ private getGeneratorCommandForSubSection; /** * Creates the generator directive * @param subSection - The current FieldSubSection * @param generatorCmd - The generator command * @returns A generator Directive */ private createGeneratorDirective; /** * Creates a reference directive * @param subSection - The current FieldSubSection * @param generatorCmd - The reference command */ private createReferenceDirective; /** * Creates the directive for static values * @param subSection - The current FieldSubSection * @param generatorCmd - The generator command * @returns A static Directive */ private createStaticValueDirective; /** * Create a meta directive * @param section - The current multiRowSection * @returns An array of meta Directives */ private createMultirowSectionDirective; /** * Claculates how many entries per section are defined * @param sectionRowId - The id of the section containing these rows * @param rowIds - All the arrays of this section * @returns The number of entries */ calculate(sectionRowId: string, rowIds: string[]): number; /** * Set a value for a row in this testcase * @param rowId - The rowId for this value * @param value - The value to be set */ setValue(rowId: string, value: string | undefined): void; /** * Set a value for a row in this testcase * @param rowId - The rowId for this value * @returns The value of this row id */ getValue(rowId: string): string; /** * Validates this section definition. * - A testcase must have a name * - A fieldSection must have at least one subSection * - If mandatory = true for a section, it must have at least one entry * - if multiple = false it must have only one entry per section * @param section - The section to be validated * @returns An array of issues found */ validate(section: SectionInterface): SectionErrorInterface[]; } //# sourceMappingURL=TestcaseDefinitionDecision.d.ts.map