예제 #1
0
        public List <User> GetUserList()
        {
            var response = _connectionService.Get("users");
            var users    = DeserializationUtil.DeserializeRestResponse <List <User> >(response);

            return(users);
        }
예제 #2
0
        public void DeserializeRestResponseTest()
        {
            _response.Content = "{\"userName\":\"test\", \"password\":\"test\"}";

            var actualUser = DeserializationUtil.DeserializeRestResponse <User>(_response);

            Assert.IsNotNull(actualUser);
            Assert.AreEqual(_user.UserName, actualUser.UserName);
            Assert.AreEqual(_user.Password, actualUser.Password);
        }