public void ApplyToQuery_LessOrEqualInteger_CorrectResultReturned() { var criteria = new NumericSearch(); criteria.Property = "Integer"; criteria.TargetTypeName = typeof(SomeClass).AssemblyQualifiedName; criteria.SearchTerm = 80; criteria.Comparator = NumericComparators.LessOrEqual; Assert.Equal(16, criteria.ApplyToQuery(new Repository().GetQuery()).Count()); }
public void ApplyToQuery_GreaterIntegerNullable_CorrectResultReturned() { var criteria = new NumericSearch(); criteria.Property = "IntegerNullable"; criteria.TargetTypeName = typeof(SomeClass).AssemblyQualifiedName; criteria.SearchTerm = 10; criteria.Comparator = NumericComparators.Greater; Assert.Equal(2, criteria.ApplyToQuery(new Repository().GetQuery()).Count()); }
private void BuildVentaNumberFilterQuery() { if (FilterEntitie.VentaId > 0) { var criteria = new NumericSearch() { Property = "SubPedido.Pedido.VentaId", TargetTypeName = typeof(SubPedidoEntry).AssemblyQualifiedName, SearchTerm = FilterEntitie.VentaId, Comparator = NumericComparators.Equal }; FilterQuerys.Add(criteria); } }