Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	README.md
#	conf/dependencies.yml
  • Loading branch information
naku committed Dec 28, 2020
2 parents b173a85 + d8521fd commit c705a9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Change Log
### Version 1.2.0 (2020-12-28)
- Deploy using Github Action
### Version 1.1.1 (2019-04-16)
- Mock repository query
### Version 1.1.0 (2019-04-15)
- Automate build
### Version 1.0.1 (2019-03-04)
Expand Down
5 changes: 5 additions & 0 deletions app/helpers/api/nuxeo/mock/MockRepository.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package helpers.api.nuxeo.mock;

import com.google.common.collect.Lists;
import com.sismics.sapparot.reflection.ReflectionUtil;
import org.nuxeo.client.objects.Document;
import org.nuxeo.client.objects.Documents;
import org.nuxeo.client.objects.Repository;
import play.libs.Codec;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -55,6 +58,8 @@ public static Repository create() {
return documentByPathMap.get(path);
});

when(repository.query(any(String.class))).thenAnswer(i -> new Documents(Lists.newArrayList(Document.createWithId(UUID.randomUUID().toString(), "Document"))));

return repository;
}
}

0 comments on commit c705a9b

Please sign in to comment.