Hi,
I`m trying to mock User in ASP.NET Core as below however this can`t be done because controller.User can`t be set. How can I do this in .NET Core?
var identity = new GenericIdentity(username); identity.AddClaim(new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", username)); identity.AddClaim(new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", userId)); var principle = new GenericPrinciple(identity, mull); controller.User = principle;