Skip to content

Commit

Permalink
feat(CO-727): allow Save To Files from a shared mailbox (#255)
Browse files Browse the repository at this point in the history
* feat: add copy to files with shared mailbox

- add test to check shared mailbox is used to search for attachment
- split messageId in UUID:messageId

* chore: small changes in variable

- make test variables more idiomatic

* chore: test with mock server 5.11.2

- add map instead of flatMap to avoid nullpointer exception in case of null response from Files client
- Cannot use latest mock server version because of jackson compatibility
- Tests fail with missing com/fasterxml/jackson/databind/DeserializationFeature.FAIL_ON_TRAILING_TOKENS with latest version of mock server

* chore: use unknown length

* chore: use save draft + check response

* chore: added test for delegated account with grant options

* chore: simplify copytofiles vavr + try-with-resources

- remove verify method call test since there is already a similar test
- simplify implementation using vavr For
- use vavr try withresources

* chore: rename some tests

- use should-when syntax

* chore: save only

* chore: merge from devel + adapt to junit 5 (2)

* chore: remove junit4 import

* chore: use mockserver 5.12.0

Using mockserver 5.13.0+ is not possible for jackson compatibility issues.

* chore: use mockserver 5.13.0

* chore: CopyToFilesIT package private

* JUnit5 does not require methods to be public

* chore: clean up with suggestions from PR

* Use recoverWith to improve readability
* use mapFailure when needed (multiple cases)
* Add ServiceException "internal error"
* Add more tests on possible failures of CopyToFiles

* chore: blank diamond operator

* chore: assert exception message in test

- Fixup check of exception message

* chore: log with error

* chore: cleanup CopyToFiles handle + log error

- Refactor CopyToFiles to make handle method more readable
- Log error instead of debug when API fails

* chore: remove test added by mistake

* chore: add CC0 image for testing

- Image from: https://www.pexels.com/photo/aerial-photography-of-cloudy-mountain-7919/

* chore: use predicate not

- Use Guava not(instanceOf) instead of !( -> instanceOf)
  • Loading branch information
frisonisland authored Jun 26, 2023
1 parent 62b89d4 commit 052d460
Show file tree
Hide file tree
Showing 7 changed files with 962 additions and 754 deletions.
Loading

0 comments on commit 052d460

Please sign in to comment.