How Bunit render component authenticate API calls? #540
harshvirani911
started this conversation in
General
Replies: 1 comment
-
API is a different thing from Blazor components. Ideally you design you blazor components such that their API interactions are abstracted away behind an interface, that can be replaced during testing. For inspiration see this article: https://blazor-university.com/dependency-injection/injecting-dependencies-into-blazor-components/ For faking auth in Blazor components, bUnit has this: https://bunit.dev/docs/test-doubles/faking-auth |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Egil, How Bunit render component authenticate API calls? i am having issue as the component which i am having checks authentication for both blazor app as well api, so what approach should i use?
Beta Was this translation helpful? Give feedback.
All reactions