Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.Energy4Java


    @Test
    @Ignore( "Must fix the TODOs below. This example relied on ability to set Service MetaInfo at runtime, it seems it's not possible anymore." )
    public void testPlugins()
        throws Exception
    {
        Energy4Java runtime = new Energy4Java();
        Application app = runtime.newApplication( new MainApplicationAssembler() );
        app.activate();
    }
View Full Code Here


            private Application app;

            public void activateService()
                throws Exception
            {
                Energy4Java runtime = new Energy4Java();
                app = runtime.newApplication( new PluginApplicationAssembler( finder ) );

                app.activate();
                ServiceFinder pluginFinder = app.findModule( "Plugin layer", "Plugin module" );

                // TODO: Niclas wrote: No clue how all this Test is supposed to work, and can't figure out to create a workaround for this.
View Full Code Here

                      { // Accounts Module
                        accountsDomainAssembler,
                      }
                    }
                };
            Energy4Java qi4j = new Energy4Java();
            Application app = qi4j.newApplication( new ApplicationAssembler()
            {

                @Override
                public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
                    throws AssemblyException
View Full Code Here

    private static Energy4Java qi4j;

    public static void main( String[] args )
        throws Exception
    {
        qi4j = new Energy4Java();
        ApplicationDescriptor model = qi4j.newApplicationModel( new ApplicationAssembler()
        {
            @Override
            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
                throws AssemblyException
View Full Code Here

    // TODO Move to SPI !
    // TODO Include in each ValueSerialization extensions documentation
    public void assembledWithValuesModuleSerialization()
        throws Exception
    {
        Application app = new Energy4Java().newApplication( new ApplicationAssembler()
        {
            @Override
            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
                throws AssemblyException
            {
View Full Code Here

    @BeforeClass
    public static void setup() throws Exception
    {
        System.out.println( "\n@@@@@@@@@@@  TEST SUITE  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" );
        app = new Energy4Java().newApplication( new TestAssembler() );
        app.activate();
        Context.prepareContextBaseClass( findHostingModule() );

    }
View Full Code Here

    public void givenAppWithPrivateEntityWhenUnitOfWorkCanSeeItThenCanCommit()
        throws Exception
    {
        System.setProperty( "qi4j.compacttrace", "off" );

        Energy4Java is = new Energy4Java();
        Application app = is.newApplication( new ApplicationAssembler()
        {
            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
                throws AssemblyException
            {
                return applicationFactory.newApplicationAssembly( new Assembler[][][]{
View Full Code Here

    @Before
    public void setup()
        throws Exception
    {
        qi4j = new Energy4Java();

        Assembler[][][] assemblers = new Assembler[][][]
            {
                { // Layer Above
                  {
View Full Code Here

{
    @Test
    public void testLayersCanBeCreatedInOrderDifferentFromTheirDependency()
        throws AssemblyException
    {
        Energy4Java qi4j = new Energy4Java();

        Application app = qi4j.newApplication( new ApplicationAssembler()
        {
            public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
                throws AssemblyException
            {
                ApplicationAssembly assembly = applicationFactory.newApplicationAssembly();
View Full Code Here

{
    @Test
    public void testMixinInModuleIsVisible()
        throws Exception
    {
        Energy4Java boot = new Energy4Java();
        Assembler[][][] assemblers = new Assembler[][][]
            {
                { // Layer
                  // Module 1
                     new Assembler()
                     {
                         public void assemble( ModuleAssembly module )
                             throws AssemblyException
                         {
                             module.setName( "Module A" );
                             module.transients( B1Composite.class );
                             module.objects( ObjectA.class );
                         }
                     }
                  }
                }
            };

        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
        {
        } );
        app.activate();
        ObjectA object = app.findModule( "Layer 1", "Module A" ).newObject( ObjectA.class );
        assertEquals( "ok", object.test1() );
View Full Code Here

TOP

Related Classes of org.qi4j.bootstrap.Energy4Java

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.