use of ee.jakarta.tck.ws.rs.common.impl.StringDataSource in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method clientDataSourceWriterTest.
/*
* @testName: clientDataSourceWriterTest
*
* @assertion_ids: JAXRS:SPEC:70;
*
* @test_Strategy: See Section 4.2.4 for a list of entity providers that MUST
* be supported by all JAX-RS implementations
*/
@Test
public void clientDataSourceWriterTest() throws Fault {
DataSource ds = new StringDataSource(entity, MediaType.WILDCARD_TYPE);
standardWriterInvocation(ds);
}
use of ee.jakarta.tck.ws.rs.common.impl.StringDataSource in project jaxrs-api by eclipse-ee4j.
the class JAXRSClientIT method dataSourceWriterClientInterceptorTest.
/*
* @testName: dataSourceWriterClientInterceptorTest
*
* @assertion_ids: JAXRS:SPEC:84;
*
* @test_Strategy: JAX-RS implementations are REQUIRED to call registered
* interceptors when mapping representations to Java types and vice versa.
*/
@Test
@Tag("xml_binding")
public void dataSourceWriterClientInterceptorTest() throws Fault {
StringDataSource source = new StringDataSource(content, MediaType.WILDCARD_TYPE);
addProvider(EntityWriterInterceptor.class);
addInterceptors(EntityWriterInterceptor.class);
setRequestContentEntity(source);
setProperty(Property.REQUEST, buildRequest(Request.POST, "postdatasource"));
setProperty(Property.SEARCH_STRING, EntityWriterInterceptor.class.getName());
setProperty(Property.UNEXPECTED_RESPONSE_MATCH, Resource.DIRECTION);
invoke();
logMsg("JAXRS called registered writer interceptor for dataSource provider");
}
Aggregations