Examples of JAXBElementXmlProvider


Examples of org.apache.wink.common.internal.providers.entity.xml.JAXBElementXmlProvider

    }

    public void testJAXBElementProviderReaderWriter() throws SecurityException,
        NoSuchFieldException {

        JAXBElementXmlProvider provider = new JAXBElementXmlProvider();
        AtomFeed af = new AtomFeed();
        org.apache.wink.common.model.atom.ObjectFactory objectFactory =
            new org.apache.wink.common.model.atom.ObjectFactory();
        JAXBElement<AtomFeed> feed = objectFactory.createFeed(af);
        Type genericType =
            JAXBElementProviderTest.class.getDeclaredField("atomfeed").getGenericType();

        assertTrue(provider.isWriteable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atom+xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atomsvc+xml")));
        assertFalse(provider
            .isWriteable(feed.getClass(), genericType, null, new MediaType("text", "plain")));

        assertTrue(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                         "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atom+xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atomsvc+xml")));
        assertFalse(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "plain")));
    }
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.xml.JAXBElementXmlProvider

    }

    public void testJAXBElementProviderReaderWriter() throws SecurityException,
        NoSuchFieldException {

        JAXBElementXmlProvider provider = new JAXBElementXmlProvider();
        AtomFeed af = new AtomFeed();
        org.apache.wink.common.model.atom.ObjectFactory objectFactory =
            new org.apache.wink.common.model.atom.ObjectFactory();
        JAXBElement<AtomFeed> feed = objectFactory.createFeed(af);
        Type genericType =
            JAXBElementProviderTest.class.getDeclaredField("atomfeed").getGenericType();

        assertTrue(provider.isWriteable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atom+xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atomsvc+xml")));
        assertFalse(provider
            .isWriteable(feed.getClass(), genericType, null, new MediaType("text", "plain")));

        assertTrue(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                         "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atom+xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atomsvc+xml")));
        assertFalse(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "plain")));
    }
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.xml.JAXBElementXmlProvider

    }

    public void testJAXBElementProviderReaderWriter() throws SecurityException,
        NoSuchFieldException {

        JAXBElementXmlProvider provider = new JAXBElementXmlProvider();
        AtomFeed af = new AtomFeed();
        org.apache.wink.common.model.atom.ObjectFactory objectFactory =
            new org.apache.wink.common.model.atom.ObjectFactory();
        JAXBElement<AtomFeed> feed = objectFactory.createFeed(af);
        Type genericType =
            JAXBElementProviderTest.class.getDeclaredField("atomfeed").getGenericType();

        assertTrue(provider.isWriteable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atom+xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atomsvc+xml")));
        assertFalse(provider
            .isWriteable(feed.getClass(), genericType, null, new MediaType("text", "plain")));

        assertTrue(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                         "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atom+xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atomsvc+xml")));
        assertFalse(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "plain")));
    }
View Full Code Here

Examples of org.apache.wink.common.internal.providers.entity.xml.JAXBElementXmlProvider

    }

    public void testJAXBElementProviderReaderWriter() throws SecurityException,
        NoSuchFieldException {

        JAXBElementXmlProvider provider = new JAXBElementXmlProvider();
        AtomFeed af = new AtomFeed();
        org.apache.wink.common.model.atom.ObjectFactory objectFactory =
            new org.apache.wink.common.model.atom.ObjectFactory();
        JAXBElement<AtomFeed> feed = objectFactory.createFeed(af);
        Type genericType =
            JAXBElementProviderTest.class.getDeclaredField("atomfeed").getGenericType();

        assertTrue(provider.isWriteable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atom+xml")));
        assertTrue(provider.isWriteable(feed.getClass(),
                                        genericType,
                                        null,
                                        new MediaType("application", "atomsvc+xml")));
        assertFalse(provider
            .isWriteable(feed.getClass(), genericType, null, new MediaType("text", "plain")));

        assertTrue(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                         "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atom+xml")));
        assertTrue(provider.isReadable(feed.getClass(),
                                       genericType,
                                       null,
                                       new MediaType("application", "atomsvc+xml")));
        assertFalse(provider.isReadable(feed.getClass(), genericType, null, new MediaType("text",
                                                                                          "plain")));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.