Skip to content

Commit

Permalink
use bson[]
Browse files Browse the repository at this point in the history
  • Loading branch information
redmitry committed Oct 13, 2023
1 parent 801cdf7 commit 07d6d23
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,21 @@ public void shouldReturnErrorOnAggregateMethod() {

@Test
public void shouldAggregateWithCollectionName() {
List<Bson> predicates = Arrays.asList(
Bson[] predicates = {
Aggregates.match(eq("name", "Poliana")),
Aggregates.group("$stars", Accumulators.sum("count", 1))
);
};

template.aggregate("Person", predicates);
Mockito.verify(manager).aggregate("Person", predicates);
}

@Test
public void shouldAggregateWithEntity() {
List<Bson> predicates = Arrays.asList(
Bson[] predicates = {
Aggregates.match(eq("name", "Poliana")),
Aggregates.group("$stars", Accumulators.sum("count", 1))
);
};

template.aggregate(Person.class, predicates);
Mockito.verify(manager).aggregate("Person", predicates);
Expand Down

0 comments on commit 07d6d23

Please sign in to comment.