Commit Graph

5 Commits

Author SHA1 Message Date
David Barker 91329b8653 Updated tests based on changes to AspNet Identity Core
Added .AddDefaultTokenProviders() after the call to ConfigureMongoDbIdentity
Note: There are four places in the test project
Added .AddAuthentication() to register all the authentication types
Fixed aspnetsettings.json IncludeScopes to empty object, not false
Updated unit test packages to latest version
Added project reference for unit test rather than package reference
Removed all references to AspNet framework assemblies as these are now part of the netcoreapp3.1
2021-03-03 16:04:49 +08:00
David Barker b9491256b0 - Used the work from @knight1219 (Daniel Mathews) as the basis.
* Fixed the unit tests so that they are now passing.
Note: This is my first real introduction to Moq, so there are probably a few things that can be improved.

Changes:
* Had a few issues with the mock logger, ended up adding a LoggerFactory and Logger implementation to work around this issue (for some reason the mock logger was never called and the unit tests failed because the string builder was never updated).
* Accommodated changes to the SignInManager, UserManager where the latest version has added Logging to constructor
* SecurityStamp functions in UserManager now check for null and throws an exception, so the unit tests can no longer call GetSecurityStampAsync before its set. Line 866: https://github.com/dotnet/aspnetcore/blame/605c522fa3e875fd6d3aefa783a71d1745b7e4c7/src/Identity/Extensions.Core/src/UserManager.cs
* SignInManager.RefreshSignInAsync has changed the internal method from s.SignInAsync to SignInWithClaimsAsync
2020-01-23 22:46:35 +08:00
alexandre-spieser deb70ca9c2 updated nuget packages to latest version 2018-11-15 09:02:06 +00:00
alexandre-spieser 9f3d044d17 removing warnings. 2017-10-22 02:28:58 +00:00
alexandre-spieser 0dc4240d2c first commit 2017-10-22 00:24:46 +00:00