Example #1
0
 public void ChangePassword()
 {
     try
     {
         var controller           = new ChangePasswordController();
         IHttpActionResult result = controller.PostChangePasswordUpdate(new ChangePasswordModel()
         {
             CurrentPassword = "******", EMPPassword = "******", Id = new Guid("85b2b509-303b-4880-9e7b-074eabd6178c")
         });
         var contentResult = result as OkNegotiatedContentResult <bool>;
         if (contentResult == null)
         {
             Assert.Fail();
         }
         Assert.AreEqual(contentResult.Content, true);
     }
     catch (Exception e)
     {
         Assert.Fail(string.Format("Unexpected exception of type {0} caught: {1}", e.GetType(), e.Message));
     }
 }