Csla.Net with Bunit #447
Unanswered
ashishsinha24
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Thank you. You inject things by registering them with your TestContext.Services collection, to learn more, see https://bunit.dev/docs/providing-input/inject-services-into-components.html. E.g.: using var ctx = new TestContext();
// Register services
var dashboardViewModel = ... something here;
ctx.Services.AddSingleton<Csla.Blazor.ViewModel<Dashboard>>(dashboardViewModel);
var cut = ctx.RenderComponent<Index>(); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Congratulations on creating an amazing library.
I am just starting out with Bunit. I have understood most of things, but am stuck on a silly issue.
Csla.Blazor injects a ViewModel into a page
and then this Viewmodel exposes the properties which can be used in the blazor page.
The viewmodel can be initialized by
My problem is , how do I inject and use it in my test.
Beta Was this translation helpful? Give feedback.
All reactions