You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a solution that uses Yarp as a reverse proxy. And we have implemented a TransformProvider which has a fair amount of logic that needs to be unit tested.
I could test that by mocking a lot, if not all, of its dependencies. But then I'm mimicking a lot of existing Yarp code.
I prefer to test the TransformProvider by "arranging" the Yarp cluster en routes configuration. And then create a host and a client, and call an api using the client. So I can do some assertions to see that the TransformProvider is doing the right thing.
What I'm looking for is guidance on how to properly unit or integration test, in this case, the TransformProvider. And in general how to unit test the custom code that is used for Yarp configuration.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm currently working on a solution that uses Yarp as a reverse proxy. And we have implemented a TransformProvider which has a fair amount of logic that needs to be unit tested.
I could test that by mocking a lot, if not all, of its dependencies. But then I'm mimicking a lot of existing Yarp code.
I prefer to test the TransformProvider by "arranging" the Yarp cluster en routes configuration. And then create a host and a client, and call an api using the client. So I can do some assertions to see that the TransformProvider is doing the right thing.
What I'm looking for is guidance on how to properly unit or integration test, in this case, the TransformProvider. And in general how to unit test the custom code that is used for Yarp configuration.
Beta Was this translation helpful? Give feedback.
All reactions