I have a rather simple problem . I am simply trying to test asp.net Identity's UserStore method and have this in my test. Essentially the goal was simply to create a mock user store( in memory), insert a dummy user and verify that the insert succeeded.
[Test] public void Can_Create_User() { var identityResult = Task.FromResult(new IdentityResult()); var user = new ApplicationUser() { UserName = "Andy", Email = "[email protected]" }; var store = new Mock<UserStore<ApplicationUser>>(); store.Setup(x => x.CreateAsync(user)) .Returns(identityResult); Assert.IsTrue(identityResult.Result.Succeeded); } But the test keeps failing with 'Expected true' error.
Thank you