Search in sources :

Example 11 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class FindByMethodQueryProviderTest method shouldReturnParserQuery9.

@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "findByAgeNotLessThan" })
public void shouldReturnParserQuery9(String query) {
    Operator operator = Operator.LESSER_THAN;
    String variable = "age";
    checkNotCondition(query, operator, variable);
}
Also used : Operator(jakarta.nosql.query.Operator) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 12 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class FindByMethodQueryProviderTest method shouldReturnParserQuery7.

@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "findByAgeNotGreaterThanEqual" })
public void shouldReturnParserQuery7(String query) {
    Operator operator = Operator.GREATER_EQUALS_THAN;
    String variable = "age";
    checkNotCondition(query, operator, variable);
}
Also used : Operator(jakarta.nosql.query.Operator) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 13 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class FindByMethodQueryProviderTest method shouldReturnParserQuery11.

@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "findByAgeNotLessThanEqual" })
public void shouldReturnParserQuery11(String query) {
    Operator operator = Operator.LESSER_EQUALS_THAN;
    String variable = "age";
    checkNotCondition(query, operator, variable);
}
Also used : Operator(jakarta.nosql.query.Operator) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 14 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class FindByMethodQueryProviderTest method shouldReturnParserQuery16.

@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "findByAgeAndName" })
public void shouldReturnParserQuery16(String query) {
    Operator operator = Operator.EQUALS;
    Operator operator2 = Operator.EQUALS;
    String variable = "age";
    String variable2 = "name";
    Operator operatorAppender = Operator.AND;
    checkAppendCondition(query, operator, operator2, variable, variable2, operatorAppender);
}
Also used : Operator(jakarta.nosql.query.Operator) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 15 with Operator

use of jakarta.nosql.query.Operator in project jnosql-diana by eclipse.

the class FindByMethodQueryProviderTest method shouldReturnParserQuery12.

@ParameterizedTest(name = "Should parser the query {0}")
@ValueSource(strings = { "findByAgeLike" })
public void shouldReturnParserQuery12(String query) {
    Operator operator = Operator.LIKE;
    String variable = "age";
    checkCondition(query, operator, variable);
}
Also used : Operator(jakarta.nosql.query.Operator) ValueSource(org.junit.jupiter.params.provider.ValueSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

Operator (jakarta.nosql.query.Operator)43 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)34 ValueSource (org.junit.jupiter.params.provider.ValueSource)34 Condition (jakarta.nosql.query.Condition)3 ConditionQueryValue (jakarta.nosql.query.ConditionQueryValue)3 ParamQueryValue (jakarta.nosql.query.ParamQueryValue)2 QueryValue (jakarta.nosql.query.QueryValue)2 Where (jakarta.nosql.query.Where)2 ArrayQueryValue (jakarta.nosql.query.ArrayQueryValue)1 DeleteQuery (jakarta.nosql.query.DeleteQuery)1 SelectQuery (jakarta.nosql.query.SelectQuery)1