public void Register_AddUser()
 {
     var user = new UserRegistertionData();
     _dataBase.Expect(x => x.Add(Arg<UserTable>.Is.Anything));
     _dataBase.Expect(s => s.FindBy(Arg<Expression<Func<UserTable, bool>>>.Is.Anything)).Return(new List<UserTable>());
     _service.Register(user);
 }
        // PUT api/<controller>/5
        public HttpResponseMessage Put(UserRegistertionData user)
        {
            UserData updatedUser;
            try
            {
                updatedUser = _userService.UpdateUser(user);
            }
            catch (Exception exception)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, exception.Message);
            }

            return Request.CreateResponse(HttpStatusCode.OK, updatedUser);
        }
        // PUT api/<controller>/5
        public HttpResponseMessage Put(UserRegistertionData user)
        {
            UserData updateUser;
            try
            {
                var oldDetails = _userService.GetUser(user.IdUser);
                user.StartTime = oldDetails.StartTime;
                updateUser = _userService.UpdateUser(user);
            }
            catch (Exception exception)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, exception.Message);
            }

            return Request.CreateResponse(HttpStatusCode.OK, updateUser);
        }