Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.SingletonAssembler.module()


                throws AssemblyException
            {
                module.transients( AnyComposite.class );
            }
        };
        assembler.module().newTransientBuilder( AnyComposite.class );
    }

    @Test(expected = ConstraintViolationException.class )
    public void testClassAsTransient()
    {
View Full Code Here


            {
                module.transients( AnyTransient.class );
            }
        };

        AnyTransient anyTransient = assembler.module().newTransient( AnyTransient.class );
        assertThat( anyTransient.hello( "me" ), new IsEqual<String>("Hello ME from Module 1") );

        assertThat( anyTransient.hello( "World" ), new IsEqual<String>( "Hello WORLD from ME"  ) );
        anyTransient.hello( "Universe" );
    }
View Full Code Here

                module.services( TestServiceComposite1.class,
                                 TestServiceComposite2.class );
            }
        };

        ObjectFactory obf = assembler.module();
        ServiceConsumer consumer = obf.newObject( ServiceConsumer.class, TestServiceComposite2.class.getSimpleName() );
        TestService service = consumer.getService();

        assertThat( "service is selected one", service.test(), equalTo( "mixin2" ) );
    }
View Full Code Here

            }
        };

        assertFalse( isActive );

        assembly.module().injectTo( this );

        assertFalse( isActive );

        service.get();
View Full Code Here

                module.values( ContactsValue.class, ContactValue.class );
                new EntityTestAssembler().assemble( module );
            }
        };
        uow = assembler.module().newUnitOfWork();
        Network.populate( uow, assembler.module() );
        uow.complete();
        uow = assembler.module().newUnitOfWork();
        Network.refresh( uow );
        qbf = assembler.module();
View Full Code Here

                module.values( ContactsValue.class, ContactValue.class );
                new EntityTestAssembler().assemble( module );
            }
        };
        uow = assembler.module().newUnitOfWork();
        Network.populate( uow, assembler.module() );
        uow.complete();
        uow = assembler.module().newUnitOfWork();
        Network.refresh( uow );
        qbf = assembler.module();
    }
View Full Code Here

            }
        };
        uow = assembler.module().newUnitOfWork();
        Network.populate( uow, assembler.module() );
        uow.complete();
        uow = assembler.module().newUnitOfWork();
        Network.refresh( uow );
        qbf = assembler.module();
    }

    @After
View Full Code Here

        uow = assembler.module().newUnitOfWork();
        Network.populate( uow, assembler.module() );
        uow.complete();
        uow = assembler.module().newUnitOfWork();
        Network.refresh( uow );
        qbf = assembler.module();
    }

    @After
    public void tearDown()
    {
View Full Code Here

            {
                module.objects( TestObject.class );
            }
        };

        TestObject object = assembler.module().newObject( TestObject.class );

        object.doStuff();
    }

    @Concerns( LogConcern.class )
View Full Code Here

            public void assemble( ModuleAssembly module )
                throws AssemblyException
            {
            }
        };
        assembler.module().newObject( AnyObject.class );
    }

    /**
     * Tests that an object builder cannot be created for a 'null' type.
     *
 
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.