Package org.apache.webbeans.test.component.event.normal

Examples of org.apache.webbeans.test.component.event.normal.ComponentWithObserves6


        /*
         * DO NOT CALL getInstance FOR component3! IF_EXISTS NEEDS TO FAIL FOR THAT OBJECT.
         */
        ComponentWithObserves4 instance = getManager().getInstance(component4);
        ComponentWithObserves5 instanceIE = getManager().getInstance(component5);
        ComponentWithObserves6 outstance = getManager().getInstance(component6);
        instanceIE.getUserName()// This causes the observer to exist in the context, therefore IF_EXISTS is true.
       
        LoggedInEvent event = new LoggedInEvent("Gurkan");

        Annotation[] anns = new Annotation[1];
        anns[0] = new NotAnyLiteral();

        getManager().fireEvent(event, anns);
       
        Assert.assertEquals("IEGurkan", outstance.getUserIEName());
        Assert.assertEquals("Gurkan", outstance.getUserName());
        Assert.assertNull(outstance.getUserNIEName());
    }
View Full Code Here


        /*
         * DO NOT CALL getInstance FOR component3! IF_EXISTS NEEDS TO FAIL FOR THAT OBJECT.
         */
        ComponentWithObserves4 instance = getManager().getInstance(component4);
        ComponentWithObserves5 instanceIE = getManager().getInstance(component5);
        ComponentWithObserves6 outstance = getManager().getInstance(component6);
        instanceIE.getUserName()// This causes the observer to exist in the context, therefore IF_EXISTS is true.
       
        LoggedInEvent event = new LoggedInEvent("Gurkan");

        Annotation[] anns = new Annotation[1];
        anns[0] = new NotAnyLiteral();

        getManager().fireEvent(event, anns);
       
        Assert.assertEquals("IEGurkan", outstance.getUserIEName());
        Assert.assertEquals("Gurkan", outstance.getUserName());
        Assert.assertNull(outstance.getUserNIEName());
    }
View Full Code Here

        /*
         * DO NOT CALL getInstance FOR component3! IF_EXISTS NEEDS TO FAIL FOR THAT OBJECT.
         */
        ComponentWithObserves4 instance = getManager().getInstance(component4);
        ComponentWithObserves5 instanceIE = getManager().getInstance(component5);
        ComponentWithObserves6 outstance = getManager().getInstance(component6);
        instanceIE.getUserName()// This causes the observer to exist in the context, therefore IF_EXISTS is true.
       
        LoggedInEvent event = new LoggedInEvent("Gurkan");

        Annotation[] anns = new Annotation[1];
        anns[0] = new NotAnyLiteral();

        getManager().fireEvent(event, anns);
       
        Assert.assertEquals("IEGurkan", outstance.getUserIEName());
        Assert.assertEquals("Gurkan", outstance.getUserName());
        Assert.assertNull(outstance.getUserNIEName());
    }
View Full Code Here

        /*
         * DO NOT CALL getInstance FOR component3! IF_EXISTS NEEDS TO FAIL FOR THAT OBJECT.
         */
        ComponentWithObserves4 instance = getManager().getInstance(component4);
        ComponentWithObserves5 instanceIE = getManager().getInstance(component5);
        ComponentWithObserves6 outstance = getManager().getInstance(component6);
        instanceIE.getUserName()// This causes the observer to exist in the context, therefore IF_EXISTS is true.
       
        LoggedInEvent event = new LoggedInEvent("Gurkan");

        Annotation[] anns = new Annotation[1];
        anns[0] = new NotAnyLiteral();

        getManager().fireEvent(event, anns);
       
        Assert.assertEquals("IEGurkan", outstance.getUserIEName());
        Assert.assertEquals("Gurkan", outstance.getUserName());
        Assert.assertNull(outstance.getUserNIEName());
    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.test.component.event.normal.ComponentWithObserves6

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.