Package org.jboss.arquillian.persistence.core.metadata

Examples of org.jboss.arquillian.persistence.core.metadata.MetadataExtractor


   private SqlScriptProvider<CreateSchema> createProviderForCreateSchemaScripts(TestClass testClass)
   {
      return SqlScriptProvider.forAnnotation(CreateSchema.class)
            .usingConfiguration(configuration.get())
            .extractingMetadataUsing(new MetadataExtractor(testClass))
            .namingFollows(new FileNamingStrategy<String>("sql"){
               @Override
               public String getFileExtension()
               {
                  return extension;
View Full Code Here


      PersistenceExtensionFeatureResolver persistenceExtensionFeatureResolver = persistenceExtensionFeatureResolverInstance.get();

      if (persistenceExtensionFeatureResolver.shouldVerifyDataAfterTest())
      {
         final MetadataExtractor metadataExtractor = metadataExtractorInstance.get();
         final ExpectedDataSetProvider dataSetProvider = new ExpectedDataSetProvider(metadataExtractor, configurationInstance.get());
         final Method testMethod = afterPersistenceTest.getTestMethod();
         final ShouldMatchDataSet dataSetsToVerify = metadataExtractor.shouldMatchDataSet()
                                                                      .fetchFrom(testMethod);

         compareDataEvent.fire(new CompareData(dataSetProvider.getDescriptorsDefinedFor(testMethod), dataSetsToVerify.excludeColumns()));
      }
View Full Code Here

   @Inject
   private Event<BeforePersistenceClass> beforePersistenceClassEvent;

   public void beforeClass(@Observes BeforeClass beforeClass)
   {
      metadataExtractorProducer.set(new MetadataExtractor(beforeClass.getTestClass()));
      persistenceExtensionEnabler.set(new PersistenceExtensionEnabler(metadataExtractorProducer.get()));
      if (persistenceExtensionEnabler.get().isPersistenceExtensionRequired())
      {
         initializeConfigurationEvent.fire(new InitializeConfiguration());
         beforePersistenceClassEvent.fire(new BeforePersistenceClass(beforeClass.getTestClass()));
View Full Code Here

   private Set<ResourceDescriptor<?>> fetchAllDataResources(TestClass testClass)
   {
      final Set<ResourceDescriptor<?>> allDataSets = new HashSet<ResourceDescriptor<?>>();

      final DataSetProvider dataSetProvider = new DataSetProvider(new MetadataExtractor(testClass), dbunitConfigurationInstance.get());
      final ExpectedDataSetProvider expectedDataSetProvider = new ExpectedDataSetProvider(new MetadataExtractor(testClass), dbunitConfigurationInstance.get());
      final SqlScriptProvider<ApplyScriptBefore> scriptsAppliedBeforeTestProvider = createProviderForScriptsToBeAppliedBeforeTest(testClass);
      final SqlScriptProvider<ApplyScriptAfter> scriptsAppliedAfterTestProvider = createProviderForScriptsToBeAppliedAfterTest(testClass);
      final SqlScriptProvider<CleanupUsingScript> cleanupScriptsProvider = createProviderForCleanupScripts(testClass);
      final SqlScriptProvider<CreateSchema> createSchemaScripts = createProviderForCreateSchemaScripts(testClass);
View Full Code Here

   private SqlScriptProvider<ApplyScriptAfter> createProviderForScriptsToBeAppliedAfterTest(TestClass testClass)
   {
      return SqlScriptProvider.forAnnotation(ApplyScriptAfter.class)
                              .usingConfiguration(configurationInstance.get())
                              .extractingMetadataUsing(new MetadataExtractor(testClass))
                              .namingFollows(new PrefixedScriptFileNamingStrategy("after-", "sql"))
                              .build(new ValueExtractor<ApplyScriptAfter>()
                              {
                                 @Override
                                 public String[] extract(ApplyScriptAfter toExtract)
View Full Code Here

   private SqlScriptProvider<ApplyScriptBefore> createProviderForScriptsToBeAppliedBeforeTest(TestClass testClass)
   {
      return SqlScriptProvider.forAnnotation(ApplyScriptBefore.class)
                              .usingConfiguration(configurationInstance.get())
                              .extractingMetadataUsing(new MetadataExtractor(testClass))
                              .namingFollows(new PrefixedScriptFileNamingStrategy("before-", "sql"))
                              .build(new ValueExtractor<ApplyScriptBefore>()
                              {
                                 @Override
                                 public String[] extract(ApplyScriptBefore toExtract)
View Full Code Here

   private SqlScriptProvider<CleanupUsingScript> createProviderForCleanupScripts(TestClass testClass)
   {
      return SqlScriptProvider.forAnnotation(CleanupUsingScript.class)
            .usingConfiguration(configurationInstance.get())
            .extractingMetadataUsing(new MetadataExtractor(testClass))
            .namingFollows(new PrefixedScriptFileNamingStrategy("cleanup-", "sql"))
            .build(new ValueExtractor<CleanupUsingScript>()
            {
               @Override
               public String[] extract(CleanupUsingScript toExtract)
View Full Code Here

   private SqlScriptProvider<CreateSchema> createProviderForCreateSchemaScripts(TestClass testClass)
   {
      return SqlScriptProvider.forAnnotation(CreateSchema.class)
            .usingConfiguration(configurationInstance.get())
            .extractingMetadataUsing(new MetadataExtractor(testClass))
            .namingFollows(new FileNamingStrategy<String>("sql"){
               @Override
               public String getFileExtension()
               {
                  return extension;
View Full Code Here

   public static SqlScriptProvider<CleanupUsingScript> createProviderForCleanupScripts(TestClass testClass, ScriptingConfiguration configuration)
   {
      return SqlScriptProvider.forAnnotation(CleanupUsingScript.class)
                              .usingConfiguration(configuration)
                              .extractingMetadataUsing(new MetadataExtractor(testClass))
                              .namingFollows(new PrefixedScriptFileNamingStrategy("cleanup-", "sql"))
                              .build(new ValueExtractor<CleanupUsingScript>()
                              {
                                 @Override
                                 public String[] extract(CleanupUsingScript toExtract)
View Full Code Here

   public static SqlScriptProvider<ApplyScriptAfter> createProviderForScriptsToBeAppliedAfterTest(TestClass testClass, ScriptingConfiguration configuration)
   {
      return SqlScriptProvider.forAnnotation(ApplyScriptAfter.class)
                              .usingConfiguration(configuration)
                              .extractingMetadataUsing(new MetadataExtractor(testClass))
                              .namingFollows(new PrefixedScriptFileNamingStrategy("after-", "sql"))
                              .build(new ValueExtractor<ApplyScriptAfter>()
                              {
                                 @Override
                                 public String[] extract(ApplyScriptAfter toExtract)
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.persistence.core.metadata.MetadataExtractor

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.