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

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


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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertEquals("Gurkan", instance.getUserName());
    }
View Full Code Here


        AbstractOwbBean<ComponentWithObserves1> component = defineManagedBean(ComponentWithObserves1.class);
        AbstractOwbBean<ComponentWithObservable1> componentObservable = defineManagedBean(ComponentWithObservable1.class);

        WebBeansContext.getInstance().getContextFactory().initRequestContext(null);

        ComponentWithObserves1 instance = getManager().getInstance(component);
        ComponentWithObservable1 observable = getManager().getInstance(componentObservable);

        observable.afterLoggedIn();

        Assert.assertEquals("Gurkan", instance.getUserName());
    }
View Full Code Here

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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertNotNull(instance.getUserName());

        Assert.assertEquals("Gurkan", instance.getUserNameWithMember());
    }
View Full Code Here

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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertEquals("Mark", instance.getUserName());
        Assert.assertNull(instance.getUserNameWithMember());
    }
View Full Code Here

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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertEquals("Gurkan", instance.getUserName());
    }
View Full Code Here

        AbstractComponent<ComponentWithObserves1> component = defineSimpleWebBean(ComponentWithObserves1.class);
        AbstractComponent<ComponentWithObservable1> componentObservable = defineSimpleWebBean(ComponentWithObservable1.class);

        ContextFactory.initRequestContext(null);

        ComponentWithObserves1 instance = getManager().getInstance(component);
        ComponentWithObservable1 observable = getManager().getInstance(componentObservable);

        observable.afterLoggedIn();

        Assert.assertEquals("Gurkan", instance.getUserName());
    }
View Full Code Here

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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertNull(instance.getUserName());

        Assert.assertEquals("Gurkan", instance.getUserNameWithMember());
    }
View Full Code Here

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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertEquals("Gurkan", instance.getUserName());
    }
View Full Code Here

        AbstractOwbBean<ComponentWithObserves1> component = defineManagedBean(ComponentWithObserves1.class);
        AbstractOwbBean<ComponentWithObservable1> componentObservable = defineManagedBean(ComponentWithObservable1.class);

        ContextFactory.initRequestContext(null);

        ComponentWithObserves1 instance = getManager().getInstance(component);
        ComponentWithObservable1 observable = getManager().getInstance(componentObservable);

        observable.afterLoggedIn();

        Assert.assertEquals("Gurkan", instance.getUserName());
    }
View Full Code Here

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

        getManager().fireEvent(event, anns);

        ComponentWithObserves1 instance = getManager().getInstance(component);

        Assert.assertNotNull(instance.getUserName());

        Assert.assertEquals("Gurkan", instance.getUserNameWithMember());
    }
View Full Code Here

TOP

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

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.