Hi Saneth,
These are the two test case methods related to the exception,
@Test(groups = {"wso2.esb"}, description = "Tests with filter mediator
- JSON path Scenario - Filter condition true" , enabled=false)
public void testJSONFilterFromJSONPathConditionTrueTestScenario()
throws Exception {
String JSON_PAYLOAD = "{\"album\":\"Hello\",\"singer\":\"Peter\"}";
WebResource webResource = client
.resource(getProxyServiceURLHttp("JSONPathFilterWithJSONProxy"));
// sending post request
ClientResponse postResponse = webResource.type("application/json")
.post(ClientResponse.class, JSON_PAYLOAD);
assertEquals(postResponse.getType().toString(),
"application/json", "Content-Type Should be application/json");
assertEquals(postResponse.getStatus(), 201, "Response status
should be 201");
// Calling the GET request to verify Added album details
ClientResponse getResponse = webResource.type("application/json")
.get(ClientResponse.class);
assertNotNull(getResponse, "Received Null response for while
getting Music album details");
assertEquals(getResponse.getEntity(String.class), JSON_PAYLOAD,
"Response mismatch for HTTP Get call");
}
@Test(groups = {"wso2.esb"}, description = "Tests with filter mediator
- JSON path Scenario Filter condition False",
dependsOnMethods =
"testJSONFilterFromJSONPathConditionTrueTestScenario")
public void testJSONFilterFromJSONPathConditionFalseTestScenario()
throws Exception {
String JSON_PAYLOAD = "{\"album\":\"Moon\",\"singer\":\"Peter\"}";
WebResource webResource = client
.resource(getProxyServiceURLHttp("FilterWithJSONProxy"));
// sending post request
ClientResponse postResponse = webResource.type("application/json")
.post(ClientResponse.class, JSON_PAYLOAD);
assertEquals(postResponse.getStatus(), 202, "Response status
should be 202");
}
Thanks
Regards
Kevin
On Tue, May 12, 2015 at 1:43 PM, Saneth Dharmakeerthi <[email protected]>
wrote:
> Hi Kevin,
>
> Please share the full test case with us.
>
> Thanks and Best Regards,
>
> Saneth Dharmakeerthi
> Senior Software Engineer
> WSO2, Inc.
> Mobile: +94772325511
>
> On Tue, May 12, 2015 at 12:24 PM, Kevin Ratnasekera <[email protected]>
> wrote:
>
>> Hi all,
>> org.testng.TestNGException:
>> org.wso2.carbon.esb.contenttype.json.FilterFromJSONPathTestCase.testJSONFilterFromJSONPathConditionFalseTestScenario()
>> is depending on method public void
>> org.wso2.carbon.esb.contenttype.json.FilterFromJSONPathTestCase.testJSONFilterFromJSONPathConditionTrueTestScenario()
>> throws java.lang.Exception, which is not annotated with @Test
>>
>> I am running integration tests on java version 1.7. The failing test
>> methods are depended on other methods. ( dependsOnMethods ) The classes
>> which does not include depended test methods pass successfully.
>> Regards
>> Kevin
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev