assertEquals( 1,
dtable0.getConditions().size() );
assertTrue( dtable0.getConditions().get( 0 ) instanceof BRLConditionColumn );
//Column 1
BRLConditionColumn conditionCol0_0 = ( (BRLConditionColumn) dtable0.getConditions().get( 0 ) );
assertEquals( "Person's name",
conditionCol0_0.getHeader() );
assertEquals( 1,
conditionCol0_0.getChildColumns().size() );
List<IPattern> conditionCol0_0definition = conditionCol0_0.getDefinition();
assertEquals( 1,
conditionCol0_0definition.size() );
assertTrue( conditionCol0_0definition.get( 0 ) instanceof FreeFormLine );
FreeFormLine conditionCol0_0ffl = (FreeFormLine) conditionCol0_0definition.get( 0 );
assertEquals( "Person(name == \"@{param1}\")",
conditionCol0_0ffl.getText() );
//Column 1 - Variable 1
BRLConditionVariableColumn conditionCol0_0param0 = conditionCol0_0.getChildColumns().get( 0 );
assertEquals( "param1",
conditionCol0_0param0.getVarName() );
assertEquals( "Person's name",
conditionCol0_0param0.getHeader() );
assertEquals( DataType.TYPE_OBJECT,
conditionCol0_0param0.getFieldType() );
assertNull( conditionCol0_0param0.getFactType() );
assertNull( conditionCol0_0param0.getFactField() );
//Column 2
BRLActionColumn actionCol0_0 = ( (BRLActionColumn) dtable0.getActionCols().get( 0 ) );
assertEquals( "Salutation",
actionCol0_0.getHeader() );
assertEquals( 1,
actionCol0_0.getChildColumns().size() );
List<IAction> actionCol0_0definition = actionCol0_0.getDefinition();
assertEquals( 1,
actionCol0_0definition.size() );
assertTrue( actionCol0_0definition.get( 0 ) instanceof FreeFormLine );
FreeFormLine actionCol0_0ffl = (FreeFormLine) actionCol0_0definition.get( 0 );
assertEquals( "System.out.println(\"@{param2}\");",
actionCol0_0ffl.getText() );
//Column 1 - Variable 1
BRLActionVariableColumn actionCol0_0param0 = actionCol0_0.getChildColumns().get( 0 );
assertEquals( "param2",
actionCol0_0param0.getVarName() );
assertEquals( "Salutation",
actionCol0_0param0.getHeader() );
assertEquals( DataType.TYPE_OBJECT,
actionCol0_0param0.getFieldType() );
assertNull( actionCol0_0param0.getFactType() );
assertNull( actionCol0_0param0.getFactField() );
//Check data
assertEquals( 2,
dtable0.getData().size() );
assertTrue( isRowEquivalent( new String[]{ "1", "Created from row 7", "AG1", "John", "Hello Sir" },
dtable0.getData().get( 0 ) ) );
assertTrue( isRowEquivalent( new String[]{ "2", "Created from row 8", "AG2", "Jane", "Hello Madam" },
dtable0.getData().get( 1 ) ) );
//Check expanded columns
List<BaseColumn> columns1 = dtable1.getExpandedColumns();
assertNotNull( columns1 );
assertEquals( 5,
columns1.size() );
assertTrue( columns1.get( 0 ) instanceof RowNumberCol52 );
assertTrue( columns1.get( 1 ) instanceof DescriptionCol52 );
assertTrue( columns1.get( 2 ) instanceof BRLConditionVariableColumn );
assertTrue( columns1.get( 3 ) instanceof BRLConditionVariableColumn );
assertTrue( columns1.get( 4 ) instanceof AnalysisCol52 );
//Check individual condition columns
assertEquals( 1,
dtable0.getConditions().size() );
assertTrue( dtable0.getConditions().get( 0 ) instanceof BRLConditionColumn );
//Column 1
BRLConditionColumn conditionCol1_0 = ( (BRLConditionColumn) dtable1.getConditions().get( 0 ) );
assertEquals( "Converted from cell [C12]",
conditionCol1_0.getHeader() );
assertEquals( 2,
conditionCol1_0.getChildColumns().size() );
List<IPattern> conditionCol1_0definition = conditionCol1_0.getDefinition();
assertEquals( 1,
conditionCol1_0definition.size() );
assertTrue( conditionCol1_0definition.get( 0 ) instanceof FreeFormLine );
FreeFormLine conditionCol1_0ffl = (FreeFormLine) conditionCol1_0definition.get( 0 );
assertEquals( "Person(name == \"@{param1}\", age == \"@{param2}\")",
conditionCol1_0ffl.getText() );
//Column 1 - Variable 1
BRLConditionVariableColumn conditionCol1_0param0 = conditionCol1_0.getChildColumns().get( 0 );
assertEquals( "param1",
conditionCol1_0param0.getVarName() );
assertEquals( "Converted from cell [C12]",
conditionCol1_0param0.getHeader() );
assertEquals( DataType.TYPE_OBJECT,
conditionCol1_0param0.getFieldType() );
assertNull( conditionCol1_0param0.getFactType() );
assertNull( conditionCol1_0param0.getFactField() );
//Column 1 - Variable 2
BRLConditionVariableColumn conditionCol1_0param1 = conditionCol1_0.getChildColumns().get( 1 );
assertEquals( "param2",
conditionCol1_0param1.getVarName() );
assertEquals( "Converted from cell [C12]",
conditionCol1_0param1.getHeader() );
assertEquals( DataType.TYPE_OBJECT,