Package org.jboss.arquillian.persistence.core.configuration

Examples of org.jboss.arquillian.persistence.core.configuration.PersistenceConfiguration


            final MetadataExtractor extractor = new MetadataExtractor(event.getTestClass());
            final boolean isActive = new PersistenceExtensionEnabler(extractor).shouldPersistenceExtensionBeActivated();
            active.set(isActive);

            if (isActive) {
                final PersistenceConfiguration persistenceConfiguration = configurationInstance.get();
                persistenceExtensionFeatureResolverProvider.set(new PersistenceExtensionFeatureResolver(event.getTestMethod(), extractor, persistenceConfiguration));
                persistenceExtensionScriptingFeatureResolverProvider.set(new PersistenceExtensionScriptingFeatureResolver(event.getTestMethod(), extractor, scriptingConfigurationInstance.get()));

                beforePersistenceTestEvent.fire(new BeforePersistenceTest(event));
            }
View Full Code Here


      }
   }

   public void beforeTest(@Observes(precedence = 25) Before beforeTestEvent)
   {
      PersistenceConfiguration persistenceConfiguration = configurationInstance.get();
      persistenceExtensionFeatureResolverProvider.set(new PersistenceExtensionFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), persistenceConfiguration));
      persistenceExtensionScriptingFeatureResolverProvider.set(new PersistenceExtensionScriptingFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), scriptingConfigurationInstance.get()));

      if (persistenceExtensionEnabler.get().shouldPersistenceExtensionBeActivated())
      {
View Full Code Here

   // Private methods

   private void executeScriptsBeforeTest(BeforePersistenceTest beforePersistenceTest)
   {
      final PersistenceConfiguration persistenceConfiguration = configuration.get();
      String[] scriptsToExecuteBeforeTest = persistenceConfiguration.getScriptsToExecuteBeforeTest();
      final List<SqlScriptResourceDescriptor> scripts = processScripts(scriptsToExecuteBeforeTest);
      applyScriptsBeforeTestEvent.fire(new ApplyScriptsBeforeTest(beforePersistenceTest, scripts));
   }
View Full Code Here

      applyScriptsBeforeTestEvent.fire(new ApplyScriptsBeforeTest(beforePersistenceTest, scripts));
   }

   private void executeScriptsAfterTest(AfterPersistenceTest afterPersistenceTest)
   {
      final PersistenceConfiguration persistenceConfiguration = configuration.get();
      String[] scriptsToExecuteAfterTest = persistenceConfiguration.getScriptsToExecuteAfterTest();
      final List<SqlScriptResourceDescriptor> scripts = processScripts(scriptsToExecuteAfterTest);
      applyScriptsAfterTestEvent.fire(new ApplyScriptsAfterTest(afterPersistenceTest, scripts));
   }
View Full Code Here

      }
   }

   public void beforeTest(@Observes Before beforeTestEvent)
   {
      PersistenceConfiguration persistenceConfiguration = configurationInstance.get();
      persistenceExtensionFeatureResolverProvider.set(new PersistenceExtensionFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), persistenceConfiguration));

      if (persistenceExtensionEnabler.get().isPersistenceExtensionRequired())
      {
         createDataSource();
View Full Code Here

   @Inject @ApplicationScoped
   InstanceProducer<PersistenceConfiguration> configurationProducer;

   public void configure(@Observes InitializeConfiguration event)
   {
      final PersistenceConfiguration configuration = new PersistenceConfiguration();
      Configuration.importTo(configuration).loadFromPropertyFile(configuration.getPrefix() + "properties");
      configurationProducer.set(configuration);
   }
View Full Code Here

   InstanceProducer<PersistenceConfiguration> configurationProducer;

   @Override
   protected PersistenceConfiguration create()
   {
      return new PersistenceConfiguration();
   }
View Full Code Here

   }

   @Override
   public void observe(@Observes BeforeSuite beforeSuiteEvent)
   {
      final PersistenceConfiguration persistenceConfiguration = configureFromArquillianDescriptor();
      configurationProducer.set(persistenceConfiguration);
   }
View Full Code Here

   InstanceProducer<PersistenceConfiguration> configurationProducer;

   @Override
   protected PersistenceConfiguration create()
   {
      return new PersistenceConfiguration();
   }
View Full Code Here

      }
   }

   public void beforeTest(@Observes(precedence = 25) Before beforeTestEvent)
   {
      PersistenceConfiguration persistenceConfiguration = configurationInstance.get();
      persistenceExtensionFeatureResolverProvider.set(new PersistenceExtensionFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), persistenceConfiguration));
      persistenceExtensionScriptingFeatureResolverProvider.set(new PersistenceExtensionScriptingFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), scriptingConfigurationInstance.get()));

      if (persistenceExtensionEnabler.get().shouldPersistenceExtensionBeActivated())
      {
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.persistence.core.configuration.PersistenceConfiguration

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.