Skip to content

Commit

Permalink
FMWK-428 Refactor tests (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr authored Sep 1, 2024
1 parent 751ebb1 commit 5abebb5
Show file tree
Hide file tree
Showing 69 changed files with 469 additions and 3,906 deletions.
4 changes: 2 additions & 2 deletions src/main/asciidoc/reference/query-methods-modification.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Below is an example of different variations:
Qualifier firstNameEqJohn = Qualifier.builder()
.setField("firstName")
.setFilterOperation(FilterOperation.EQ)
.setValue1(Value.get("John"))
.setValue("John")
.build();
result = repository.findUsingQuery(new Query(firstNameEqJohn));
assertThat(result).containsOnly(john);
Expand All @@ -57,7 +57,7 @@ Below is an example of different variations:
Qualifier sinceUpdateTimeLt50Seconds = Qualifier.metadataBuilder()
.setMetadataField(SINCE_UPDATE_TIME)
.setFilterOperation(FilterOperation.LT)
.setValue1AsObj(50000L)
.setValue(50000L)
.build();
result = repository.findUsingQuery(new Query(sinceUpdateTimeLt50Seconds));
assertThat(result).contains(john);
Expand Down
2 changes: 1 addition & 1 deletion src/main/asciidoc/reference/template.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ long count = template.count
(new QualifierBuilder()
.setFilterOperation(FilterOperation.EQ)
.setField("firstName")
.setValue1(Value.get("John"))
.setValue("John")
.build()
),
Person.class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Exp filterExp(Map<QualifierKey, Object> qualifierMap) {
Qualifier.builder()
.setPath(getBinName(qualifierMap))
.setFilterOperation(FilterOperation.EQ)
.setValue(Value.get(item))
.setValue(item)
.build()
.getFilterExp()
).toArray(Exp[]::new);
Expand All @@ -154,7 +154,7 @@ public Exp filterExp(Map<QualifierKey, Object> qualifierMap) {
Qualifier.builder()
.setPath(getBinName(qualifierMap))
.setFilterOperation(FilterOperation.NOTEQ)
.setValue(Value.get(item))
.setValue(item)
.build()
.getFilterExp()
).toArray(Exp[]::new);
Expand Down Expand Up @@ -576,7 +576,7 @@ public Exp filterExp(Map<QualifierKey, Object> qualifierMap) {
Qualifier.builder()
.setFilterOperation(FilterOperation.MAP_VAL_EQ_BY_KEY)
.setPath(path)
.setValue(Value.get(item))
.setValue(item)
.build()
.getFilterExp()
).toArray(Exp[]::new);
Expand Down Expand Up @@ -609,7 +609,7 @@ public Exp filterExp(Map<QualifierKey, Object> qualifierMap) {
Qualifier.builder()
.setFilterOperation(FilterOperation.MAP_VAL_NOTEQ_BY_KEY)
.setPath(path)
.setValue(Value.get(item))
.setValue(item)
.build()
.getFilterExp()
).toArray(Exp[]::new);
Expand Down Expand Up @@ -1559,7 +1559,7 @@ private static Exp processMetadataFieldInOrNot(Map<QualifierKey, Object> qualifi
Qualifier.metadataBuilder()
.setMetadataField(getMetadataField(qualifierMap))
.setFilterOperation(filterOperation)
.setValue(Value.get(item))
.setValue(item)
.build()
.getFilterExp()
).toArray(Exp[]::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected static String getFieldName(String segmentName, AerospikePersistentProp

protected static void setQbValuesForMapByKey(QueryQualifierBuilder qb, Object key, Object value) {
qb.setKey(Value.get(value)); // contains value
qb.setValue(Value.get(key)); // contains key
qb.setValue(key); // contains key
}

protected static Object convertIfNecessary(Object obj, MappingAerospikeConverter converter) {
Expand Down

This file was deleted.

Loading

0 comments on commit 5abebb5

Please sign in to comment.