Bunit & Csla.Blazor #2341
Unanswered
ashishsinha24
asked this question in
Questions
Replies: 1 comment 2 replies
-
I've never used bunit. Normally you need to configure CSLA differently for a unit test framework/runtime than for a normal (aspnet, blazor, winforms) runtime. In other words, |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use Bunit to test my Csla Blazor project, but am stuck up in basics.
I am initialising my XUnit constructor with this code.
public ControlTest()
{
Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie();
Services.AddCsla().WithBlazorServerSupport();
And trying to run this test.
[Fact]
public async Task TextInputTest()
{
// Arrange
ViewModel<ServiceEdit> vm = new ViewModel<ServiceEdit>();
await vm.RefreshAsync(() => DataPortal.CreateAsync<ServiceEdit>(1));
But unfortunately I cant even compile this. How do I pass my ViewModel to the test?
Any help would be be nice.
Beta Was this translation helpful? Give feedback.
All reactions