public void Where_EvaluateARowNotFulfillTheCritery_CriteryIsOnStringTypeColumn_ReturnFalse() { Where where = CreateWhere(); ITable table = new Table("testTable"); Column column = new Column("C1", DataTypesFactory.GetDataTypesFactory().GetDataType(TypesKeyConstants.StringTypeKey)); table.AddColumn(column); Row row = table.CreateRowDefinition(); Cell cell = row.GetCell(column.columnName); cell.data = "aaa"; where.AddCritery(column.columnName, cell.data + "b", Operator.equal); Assert.IsFalse(where.IsSelected(row)); }
public void Where_EvaluateARowNotFulfillTheCritery_CriteryIsOnDoubleTypeColumn_ReturnFalse() { Where where = CreateWhere(); ITable table = new Table("testTable"); Column column = new Column("C1", DataTypesFactory.GetDataTypesFactory().GetDataType(TypesKeyConstants.DoubleTypeKey)); table.AddColumn(column); Row row = table.CreateRowDefinition(); Cell cell = row.GetCell(column.columnName); cell.data = "1.3"; Assert.IsTrue(double.TryParse(cell.data, out double value)); where.AddCritery(column.columnName, value + 1 + "", Operator.equal); Assert.IsFalse(where.IsSelected(row)); }