Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueleresca/4780b1f9026675764c850d076ff750fa to your computer and use it in GitHub Desktop.
Save samueleresca/4780b1f9026675764c850d076ff750fa to your computer and use it in GitHub Desktop.
using System;
using System.Threading.Tasks;
using Blog.Turnmeup.DAL.Models;
using Blog.Turnmeup.DL.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Moq;
namespace Blog.Turnmeup.API.Tests
{
public class FakeUserManager : UserManager<AppUser>
{
public FakeUserManager()
: base(new Mock<IUserStore<AppUser>>().Object,
new Mock<IOptions<IdentityOptions>>().Object,
new Mock<IPasswordHasher<AppUser>>().Object,
new IUserValidator<AppUser>[0],
new IPasswordValidator<AppUser>[0],
new Mock<ILookupNormalizer>().Object,
new Mock<IdentityErrorDescriber>().Object,
new Mock<IServiceProvider>().Object,
new Mock<ILogger<UserManager<AppUser>>>().Object)
{ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment