Search in sources :

Example 1 with BeanContextServicesSupport

use of java.beans.beancontext.BeanContextServicesSupport in project podam by devopsfolks.

the class ReadOnlyComplexTypesTest method podamShouldFillInPojosWhichContainInternalLoops.

@Test
@Title("Podam should fill in POJOs which contain internal loops (e.g. objects that reference parents)")
public void podamShouldFillInPojosWhichContainInternalLoops() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    BeanContextServicesSupport pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(BeanContextServicesSupport.class, podamFactory);
    podamValidationSteps.thePojoMustBeOfTheType(pojo, BeanContextServicesSupport.class);
}
Also used : PodamFactory(uk.co.jemos.podam.api.PodamFactory) BeanContextServicesSupport(java.beans.beancontext.BeanContextServicesSupport) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Example 2 with BeanContextServicesSupport

use of java.beans.beancontext.BeanContextServicesSupport in project jdk8u_jdk by JetBrains.

the class MyBean method main.

public static void main(String[] args) {
    for (int i = 0; i < 10; i++) {
        BeanContextServices container = new BeanContextServicesSupport();
        BeanContextChild ms1 = new MyService1();
        BeanContextServices ms2 = new MyService2();
        BeanContextChild mb = new MyBean();
        container.add(ms1);
        container.add(ms2);
        ms2.add(mb);
        // exception thrown here
        container.remove(ms2);
    }
}
Also used : BeanContextServicesSupport(java.beans.beancontext.BeanContextServicesSupport) BeanContextChild(java.beans.beancontext.BeanContextChild) BeanContextServices(java.beans.beancontext.BeanContextServices)

Aggregations

BeanContextServicesSupport (java.beans.beancontext.BeanContextServicesSupport)2 BeanContextChild (java.beans.beancontext.BeanContextChild)1 BeanContextServices (java.beans.beancontext.BeanContextServices)1 Title (net.thucydides.core.annotations.Title)1 Test (org.junit.Test)1 PodamFactory (uk.co.jemos.podam.api.PodamFactory)1