Activities of "stefanos.lidas@gmail.com"

  • ABP Framework version: v7.2.3
  • UI Type: Blazor Server
  • Database System: EF Core MS SQL

I am writing unit tests for the AppService level of the project. The action I am trying to test behaves differently depending on the User roles that are assigned to ICurrentUser _currentUser. I want to test with multiple roles but I obviously can't edit my _currentUser once the test starts and from what I've gathered the _currentUser as far as the test is concerned gets set from the FakeCurrentPrincipalAccessor inside the test part of the Abp project.

My question is how can I setup multiple users with different roles and easily switch inbetween them for testing?

[Fact] public async Task Test() { //As User.... }

Showing 1 to 1 of 1 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 27, 2024, 06:34