public void TestInit() { // Arrange Mock<IUserRepository> userRepository = new Mock<IUserRepository>(); User user = new User { Email = "test", Password = "******" }; userRepository.Setup(x => x .GetByEmail("test")) .Returns(user); userRepository.Setup(x => x .AreMatchingPasswords(It.IsAny<string>(), It.IsAny<string>())) .Returns((string l, string r) => l == r); miniMembership = MockHelpers.FakeMiniMembership(userRepository.Object); }
public static MiniMembershipProvider FakeMiniMembership(IUserRepository userRepository = null) { MiniMembershipProvider miniMembership = new MiniMembershipProvider(userRepository); return miniMembership; }