use of org.knime.core.data.def.BooleanCell in project knime-core by knime.
the class ExpressionFactoryTest method testMissing.
/**
* Test method for {@link ExpressionFactory#missing(Expression)} .
*/
@Test
public void testMissing() {
final Expression missingSingle = m_factory.missing(m_mockBoolExpression);
final BooleanCell trueCell = BooleanCell.TRUE, falseCell = BooleanCell.FALSE;
testForValues(missingSingle, falseCell, falseCell, falseCell, falseCell, trueCell);
}
use of org.knime.core.data.def.BooleanCell in project knime-core by knime.
the class JavaToDataCellConversionTest method testToBooleanCell.
/**
* Test Boolean -> BooleanCell conversion.
*
* @throws Exception When something went wrong
*/
@Test
public void testToBooleanCell() throws Exception {
final BooleanCell cell = testSimpleConversion(Boolean.class, BooleanCell.TYPE, BooleanCell.class, new Boolean(true));
assertTrue(cell.getBooleanValue());
}
use of org.knime.core.data.def.BooleanCell in project knime-core by knime.
the class ExpressionFactoryTest method testAnd.
/**
* Test method for {@link ExpressionFactory#and(List)} .
*/
@Test
public void testAnd() {
final Expression andSingle = m_factory.and(Arrays.asList(m_mockBoolExpression));
final BooleanCell trueCell = BooleanCell.TRUE, falseCell = BooleanCell.FALSE;
// DataCell missing = DataType.getMissingCell();
testForValues(andSingle, trueCell, falseCell, trueCell, falseCell);
final Expression andSame = m_factory.and(Arrays.asList(m_mockBoolExpression, m_mockBoolExpression));
testForValues(andSame, trueCell, falseCell, trueCell, falseCell);
final Expression andMixed = m_factory.and(Arrays.asList(m_mockBoolExpression, m_mockBoolExpressionOther));
testForValues(andMixed, trueCell, falseCell, falseCell, falseCell);
}
Aggregations