use of ee.jakarta.tck.ws.rs.ee.rs.ext.messagebodyreaderwriter.ReadableWritableEntity in project jaxrs-api by eclipse-ee4j.
the class JAXRSProvidersClientIT method readEntityFromBodyTest.
/*
* @testName: readEntityFromBodyTest
*
* @assertion_ids: JAXRS:JAVADOC:271; JAXRS:JAVADOC:272; JAXRS:JAVADOC:138;
* JAXRS:JAVADOC:304; JAXRS:JAVADOC:282;
*
* @test_Strategy: Put entity to body and read it using reader
*/
@Test
public void readEntityFromBodyTest() throws Fault {
ReadableWritableEntity entity;
entity = new ReadableWritableEntity(EnumProvider.JAXRS.name());
setProperty(Property.REQUEST_HEADERS, "Content-Type: " + MediaType.TEXT_XML);
setProperty(Property.REQUEST, buildRequest("POST", "readEntityFromBody"));
setProperty(Property.CONTENT, entity.toXmlString());
setProperty(Property.STATUS_CODE, getStatusCode(Status.OK));
invoke();
}
use of ee.jakarta.tck.ws.rs.ee.rs.ext.messagebodyreaderwriter.ReadableWritableEntity in project jaxrs-api by eclipse-ee4j.
the class TSAppConfig method getSingletons.
@Override
public Set<Object> getSingletons() {
Set<Object> singletons = new HashSet<Object>();
singletons.add(EnumProvider.CTS);
singletons.add(new ReadableWritableEntity(""));
singletons.add(new ApplicationHolderSingleton(this));
return singletons;
}
Aggregations