public Customer(string CustomerID, string Username, string Password, string FirstName) { this.CustomerID = CustomerID; this.Username = Username; this.Password = CustomerLoginController.hashPwd(Password); this.FirstName = FirstName; }
public void LoginMethod() { try { var account = getAccount(); var controller = new CustomerLoginController(); IHttpActionResult result = controller.Get(new CustomerLoginModel() { EMPUserId = "support", EMPPassword = "******" }); var contentResult = result as OkNegotiatedContentResult <CustomerLoginModel>; Assert.AreEqual(account.Id, contentResult.Content.Id); } catch (Exception e) { Assert.Fail(string.Format("Unexpected exception of type {0} caught: {1}", e.GetType(), e.Message)); } }