public void PostsEndPointDeserializationTest()
        {
            // arrange

            RestClient client = RestOperations.ReturnRestClient(baseURL);

            RestRequest request = RestOperations.ReturnPostRequest(postsEndPoint, firstId);

            // act
            IRestResponse response = RestOperations.ExecuteRequest(client, request);

            PostsResponse postResponse = DesrializationOperation.PostDeserialize(response);

            // assert
            Assert.That(postResponse.ID, Is.EqualTo(firstId));
        }
Example #2
0
        public void CommentEndPointDeserializationTests()
        {
            // arrange
            RestClient client = RestOperations.ReturnRestClient(baseURL);

            string commentEndPoint = postsEndPoint + firstId + commentsPostsEndPoint;

            RestRequest request = RestOperations.ReturnCommentRequest(commentEndPoint);

            // act
            var response = RestOperations.ExecuteCommentRequest(client, request);

            var commentObject = DesrializationOperation.CommentDeserialize(response);

            // assert
            foreach (Comment obj in commentObject)
            {
                Assert.That(obj.ID[0], Is.EqualTo(firstId));
                break;
            }
        }