public void GivenAUserName_WhenICallGetUser_IShouldGetMatchingUser()
 {
     var controller = new UserAuthController(new UserRepositoryMock());
     var user = controller.GetUser("jdo");
     Assert.IsNotNull(user);
     Assert.AreEqual("John Doe", user.FullName);
 }
        public void GivenAUserNameAndAPassword_WhenICallPostValidate_ResponseShouldReturnSuccessCode()
        {
            var controller = new UserAuthController(new UserRepositoryMock());
            var httpConfig = new HttpConfiguration();

            controller.Configuration = httpConfig;
            controller.Request = new HttpRequestMessage();
            controller.Request.Properties[HttpPropertyKeys.HttpConfigurationKey] = httpConfig;

            var response = controller.PostValidate(new UserModel() {UserName = "******", Password = CryptoUtils.HashPassword("1234") });
            Assert.IsTrue(response.IsSuccessStatusCode);
        }