Replies: 1 comment 2 replies
-
I'd do an integration test for that, because you have a database and HTTP client call involved. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
we started to use the reactive rest client in our Quarkus project and i have some problems writing unit test for the code. Is there any nice way to test the code from the transform and from the subscribe part of the stream? i.e:
I would like to write a unit-test, which checks if the data received with the rest client is transformed and it is persisted to the database.
In a non-reactive way, i would mock the reactiveRestClient and the repository, and verify if the persist method of the repository is called with a capture parameter to check the transformedData.
Is there any way to do this (without having Thread.sleep(1000) in the unit-test), or this is a basic thing and i'm missing something?
Any help is appreciated. Thx.
Zs.
Beta Was this translation helpful? Give feedback.
All reactions