Package org.jboss.arquillian.persistence.core.event

Examples of org.jboss.arquillian.persistence.core.event.BeforePersistenceTest


            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


      persistenceExtensionScriptingFeatureResolverProvider.set(new PersistenceExtensionScriptingFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), scriptingConfigurationInstance.get()));

      if (persistenceExtensionEnabler.get().shouldPersistenceExtensionBeActivated())
      {
         createDataSource();
         beforePersistenceTestEvent.fire(new BeforePersistenceTest(beforeTestEvent));
      }

   }
View Full Code Here

   @Inject
   private Instance<PersistenceExtensionFeatureResolver> persistenceExtensionFeatureResolver;

   public void createSchema(@Observes(precedence = 10) EventContext<BeforePersistenceTest> context)
   {
      final BeforePersistenceTest beforePersistenceTest = context.getEvent();
      if (persistenceExtensionFeatureResolver.get().shouldCreateSchema() && !schemaCreated(beforePersistenceTest))
      {
         final Set<SqlScriptResourceDescriptor> schemaDescriptors = createProviderForCreateSchemaScripts(beforePersistenceTest.getTestClass()).getDescriptors(beforePersistenceTest.getTestClass());
         if (!schemaDescriptors.isEmpty())
         {
            executeScriptsEvent.fire(new ExecuteScripts(beforePersistenceTest, schemaDescriptors));
         }
      }
View Full Code Here

      persistenceExtensionFeatureResolverProvider.set(new PersistenceExtensionFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), persistenceConfiguration));

      if (persistenceExtensionEnabler.get().isPersistenceExtensionRequired())
      {
         createDataSource();
         beforePersistenceTestEvent.fire(new BeforePersistenceTest(beforeTestEvent));
      }

   }
View Full Code Here

   @Inject
   private Instance<PersistenceExtensionFeatureResolver> persistenceExtensionFeatureResolver;

   public void createSchema(@Observes(precedence = 10) EventContext<BeforePersistenceTest> context)
   {
      final BeforePersistenceTest beforePersistenceTest = context.getEvent();
      if (persistenceExtensionFeatureResolver.get().shouldCreateSchema() && !schemaCreated(beforePersistenceTest))
      {
         final Collection<SqlScriptResourceDescriptor> schemaDescriptors = SqlScriptProvider.createProviderForCreateSchemaScripts(beforePersistenceTest.getTestClass(), configuration.get()).getDescriptors(beforePersistenceTest.getTestClass());
         if (!schemaDescriptors.isEmpty())
         {
            executeScriptsEvent.fire(new ExecuteScripts(beforePersistenceTest, schemaDescriptors));
         }
      }
View Full Code Here

      persistenceExtensionScriptingFeatureResolverProvider.set(new PersistenceExtensionScriptingFeatureResolver(beforeTestEvent.getTestMethod(), metadataExtractorProducer.get(), scriptingConfigurationInstance.get()));

      if (persistenceExtensionEnabler.get().shouldPersistenceExtensionBeActivated())
      {
         createDataSource();
         beforePersistenceTestEvent.fire(new BeforePersistenceTest(beforeTestEvent));
      }

   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.persistence.core.event.BeforePersistenceTest

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.