use of org.talend.cwm.relational.TdExpression in project tdq-studio-se by Talend.
the class IndicatorDefinitionFileHelperTest method setup.
@Before
public void setup() {
indiDefinition = DefinitionFactoryImpl.eINSTANCE.createIndicatorDefinition();
EList<TdExpression> tdExpessionLs = new BasicEList<TdExpression>();
TdExpression tdExpression1 = // $NON-NLS-1$
BooleanExpressionHelper.createTdExpression(// $NON-NLS-1$
"MySql", // $NON-NLS-1$
"SELECT SUM(CHAR_LENGTH(<%=__COLUMN_NAMES__%>)), COUNT(<%=__COLUMN_NAMES__%>) FROM <%=__TABLE_NAME__%>");
TdExpression tdExpression2 = BooleanExpressionHelper.createTdExpression(// $NON-NLS-1$
"DB2", // $NON-NLS-1$
"SELECT SUM(LENGTH(<%=__COLUMN_NAMES__%>)), COUNT(<%=__COLUMN_NAMES__%>) FROM <%=__TABLE_NAME__%> <%=__WHERE_CLAUSE__%>");
tdExpessionLs.add(tdExpression1);
tdExpessionLs.add(tdExpression2);
indiDefinition.getSqlGenericExpression().add(tdExpression1);
indiDefinition.getSqlGenericExpression().add(tdExpression2);
UnitTestBuildHelper.initProjectStructure();
}
use of org.talend.cwm.relational.TdExpression in project tdq-studio-se by Talend.
the class TextIndicatorForNetezzaTest method testMaxLength.
@Test
public void testMaxLength() {
TdExpression expression = findExpressionForNetezza(MAXIMAL_LENGTH);
Assert.assertNotNull(expression);
Assert.assertEquals(MAXIMAL_LENGTH_SQL, expression.getBody());
}
use of org.talend.cwm.relational.TdExpression in project tdq-studio-se by Talend.
the class TextIndicatorForNetezzaTest method testMinLength.
@Test
public void testMinLength() {
TdExpression expression = findExpressionForNetezza(MINIMAL_LENGTH);
Assert.assertNotNull(expression);
Assert.assertEquals(MINIMAL_LENGTH_SQL, expression.getBody());
}
use of org.talend.cwm.relational.TdExpression in project tdq-studio-se by Talend.
the class TextIndicatorForNetezzaTest method testPattern.
@Test
public void testPattern() {
TdExpression expression = findExpressionForNetezza(PATTERN_FREQUENCY);
Assert.assertNotNull(expression);
Assert.assertEquals(PATTERN_FREQUENCY_SQL, expression.getBody());
}
use of org.talend.cwm.relational.TdExpression in project tdq-studio-se by Talend.
the class TextIndicatorForNetezzaTest method testMaxLengthWithBlankNull.
@Test
public void testMaxLengthWithBlankNull() {
TdExpression expression = findExpressionForNetezza(MAXIMAL_LENGTH_WITH_BLANK_AND_NULL);
Assert.assertNotNull(expression);
Assert.assertEquals(MAXIMAL_LENGTH_WITH_BLANK_AND_NULL_SQL, expression.getBody());
}
Aggregations