null,
new MediaType("application", "atomsvc+xml")));
}
public void testJAXBCollectionXMLProviderIsReadableArray() throws Exception {
JAXBArrayXmlProvider provider = new JAXBArrayXmlProvider();
assertTrue(provider.isReadable(AtomFeed[].class,
AtomFeed[].class,
null,
new MediaType("text", "xml")));
assertTrue(provider.isReadable(AtomFeed[].class,
AtomFeed[].class,
null,
new MediaType("application", "xml")));
assertTrue(provider.isReadable(AtomFeed[].class,
AtomFeed[].class,
null,
new MediaType("application", "atom+xml")));
assertTrue(provider.isReadable(AtomFeed[].class,
AtomFeed[].class,
null,
new MediaType("application", "atomsvc+xml")));
assertFalse(provider.isReadable(JAXBElement[].class,
JAXBElement[].class,
null,
new MediaType("text", "xml")));
assertFalse(provider.isReadable(JAXBElement[].class,
JAXBElement[].class,
null,
new MediaType("application", "xml")));
assertFalse(provider.isReadable(JAXBElement[].class,
JAXBElement[].class,
null,
new MediaType("application", "atom+xml")));
assertFalse(provider.isReadable(JAXBElement[].class,
JAXBElement[].class,
null,
new MediaType("application", "atomsvc+xml")));
assertFalse(provider.isReadable(String[].class, String[].class, null, new MediaType("text",
"xml")));
assertFalse(provider.isReadable(String[].class,
String[].class,
null,
new MediaType("application", "xml")));
assertFalse(provider.isReadable(String[].class,
String[].class,
null,
new MediaType("application", "atom+xml")));
assertFalse(provider.isReadable(String[].class,
String[].class,
null,
new MediaType("application", "atomsvc+xml")));
}