public void UserAccountCanBeCreated() { string testFirstname = "testuser1"; Assert.IsTrue(_mockCustomerContext.FindByEmail(testFirstname).Count == 0); _userController.AddCustomer(new List <string> { testFirstname, "test", "*****@*****.**", "safestpassword" }); List <Customer> actualResult = _mockCustomerContext.FindByEmail(testFirstname); Assert.IsTrue(actualResult.Count == 1); }
private string GetUserId(Type type, string email) { if (type.IsEquivalentTo(typeof(Customer))) { return(_customerContext.FindByEmail(email)[0].Id); } return(_adminContext.FindByEmail(email)[0].Id); }