Package org.apache.webbeans.newtests.portable.scopeextension

Examples of org.apache.webbeans.newtests.portable.scopeextension.BeanWithExtensionInjected


    public void testInjectedExtensionSerialisation() throws Exception
    {
        addExtension(new ExternalTestScopeExtension());
        startContainer(BeanWithExtensionInjected.class);

        BeanWithExtensionInjected instance = getInstance(BeanWithExtensionInjected.class);
        Assert.assertNotNull(instance);
        Assert.assertNotNull(instance.getExtension());

        Bean<ExternalTestScopeExtension> extensionBean = getBean(ExternalTestScopeExtension.class);
        Assert.assertNotNull(extensionBean);
        Assert.assertTrue(extensionBean instanceof PassivationCapable);
        Assert.assertNotNull(((PassivationCapable) extensionBean).getId());

        byte[] ba = SerializationTest.serializeObject(instance);
        Assert.assertNotNull(ba);
        BeanWithExtensionInjected serializedInstance
                = (BeanWithExtensionInjected) SerializationTest.deSerializeObject(ba);
        Assert.assertNotNull(serializedInstance);
        Assert.assertNotNull(serializedInstance.getExtension());

    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.newtests.portable.scopeextension.BeanWithExtensionInjected

Copyright © 2018 www.massapicom. 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.