Dev2.Tests.Runtime.ServiceModel.WebServicesTest.Services_Execute_WhenHasJsonPath_ShouldReturnValid C# (CSharp) Method

Services_Execute_WhenHasJsonPath_ShouldReturnValid() private method

        public void Services_Execute_WhenHasJsonPath_ShouldReturnValid()
        {
            //------------Setup for test--------------------------
            var service = CreateDummyWebService();
            service.RequestHeaders = "[[test1]]";
            service.RequestBody = "[[test2]]";
            service.RequestUrl = "[[test3]]";
            service.JsonPath = "$.results[*]";
            service.Method.Parameters.Add(new MethodParameter { Name = "test1", Value = "val1" });
            service.Method.Parameters.Add(new MethodParameter { Name = "test2", Value = "val2" });
            service.Method.Parameters.Add(new MethodParameter { Name = "test3", Value = "val3" });

            _requestResponse = "{\"results\" : [{\"address_components\": [{\"long_name\" :\"Address:\",\"short_name\" :\"Address:\",\"types\" : [\"point_of_interest\",\"establishment\" ]}]}],\"status\" : \"OK\"}";
            service.RequestResponse = _requestResponse;
            //------------Execute Test---------------------------
            ErrorResultTO errors;
            WebServices.ExecuteRequest(service, false, out errors, DummyWebExecute);
            //------------Assert Results-------------------------
            Assert.AreEqual("[{\"address_components\":[{\"long_name\":\"Address:\",\"short_name\":\"Address:\",\"types\":[\"point_of_interest\",\"establishment\"]}]}]", service.JsonPathResult);
        }
WebServicesTest