Class BaseSpringContextTest5

Direct Known Subclasses:
AbstractArrayDesignProcessingTest, AbstractGeoServiceTest5, AclAdviceTest, AclAuthorizationTest, AclQueryUtilsTest, ArrayDesignMergeServiceTest, ArrayDesignReportServiceTest, AuditEventServiceTest, AuditTrailDaoTest, AuditTrailServiceImplTest, BibliographicReferenceServiceImplTest, BibliographicReferenceServiceTest, BioAssayServiceTest, BioMaterialServiceTest, BioSequencePersistTest, BlacklistedEntityServiceTest, BlacklistTest, BlatAssociationServiceTest, BlatResultServiceTest, CharacteristicServiceTest, CompositeSequenceServiceTest, CuratableValueObjectTest, DatabaseEntryDaoImplTest, EeWriteServiceImplQtDedupTest, ExecutingTaskTest, ExperimentalDesignImportDuplicateValueTest, ExperimentalDesignImporterTest, ExpressionAnalysisResultSetServiceTest, ExpressionExperimentDeleteTest, ExpressionExperimentInCurationFilterIT, ExpressionExperimentReportServiceTest, ExpressionExperimentServiceIntegrationTest, ExpressionExperimentSetServiceTest, ExpressionExperimentSetValueObjectHelperTest, ExpressionExperimentSubSetServiceTest, ExternalDatabaseServiceTest, ExternalFileGeneLoaderServiceTest, FactorValueServiceIntegrationTest, GeneDiffExMetaAnalysisServiceTest, GeneMultifunctionalityPopulationServiceTest, GeneSetServiceTest, GeneSetValueObjectHelperTest, GeneWriteServiceTest, GenomePersisterTest, ManualAuthenticationProcessingTest, MassIndexerSmokeIntegrationTest, NCBIGene2GOAssociationParserTest, NCBIGeneLoadingTest, PersisterTest, PrincipalTest, RetryTest, SampleCoexpressionAnalysisServiceTest, SecureValueObjectAuthorizationTest, SecurityServiceTest, SimpleExpressionDataLoaderServiceTest, SplitExperimentTest, StrictBeanDefinitionValidatorTest, TaxonLoaderTest, TaxonUtilsTest, TwoChannelMissingValuesTest, TwoWayAnovaWithInteractionTest2, UserGroupServiceTest, WhatsNewServiceTest

@Deprecated @ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) public abstract class BaseSpringContextTest5 extends BaseIntegrationTest5
Deprecated.
favour the simpler BaseIntegrationTest5 for new tests
JUnit 5 (Jupiter) counterpart of BaseSpringContextTest.

Identical helper API to BaseSpringContextTest; the differences are structural:

  • Extends BaseIntegrationTest5 (Jupiter), not the JUnit 4 base.
  • The JUnit 4 MockitoRule is replaced by @ExtendWith(MockitoExtension.class). Strictness.LENIENT matches the JUnit 4 rule's default behaviour so downstream tests with unused stubs don't break on the flip.
Author:
pavlidis
  • Field Details

    • log

      protected final org.apache.commons.logging.Log log
      Deprecated.
    • externalDatabaseService

      @Autowired protected ExternalDatabaseService externalDatabaseService
      Deprecated.
    • persisterHelper

      @Autowired protected PersisterHelper persisterHelper
      Deprecated.
      Persister-shrink S4b: retained for subclasses that still inject directly via the inherited field (migrated alongside their own persisterHelper sites in the junit5 batch agents). New code should prefer typed beans like ArrayDesignPersister.
    • arrayDesignPersister

      @Autowired protected ArrayDesignPersister arrayDesignPersister
      Deprecated.
    • taxonService

      @Autowired protected TaxonService taxonService
      Deprecated.
    • testHelper

      @Autowired protected PersistentDummyObjectHelper testHelper
      Deprecated.
  • Constructor Details

    • BaseSpringContextTest5

      public BaseSpringContextTest5()
      Deprecated.
  • Method Details

    • getJdbcTemplate

      protected org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
      Deprecated.
    • getTaxon

      public Taxon getTaxon(String commonName)
      Deprecated.
      Obtain a taxon by its common name.

      See sql/init-data.sql for a list of available taxa to use in tests.

    • getTestPersistentGene

      public Gene getTestPersistentGene(Taxon taxon)
      Deprecated.
    • getTestPersistentBioSequence2GeneProducts

      public Set<BioSequence2GeneProduct> getTestPersistentBioSequence2GeneProducts(BioSequence bioSequence)
      Deprecated.
    • randomName

      public String randomName()
      Deprecated.
      Convenience shortcut for RandomStringUtils.insecure().nextAlphabetic( 10 ) (or something similar to that)
      Returns:
      random alphabetic string
    • addTestAnalyses

      protected Collection<Analysis> addTestAnalyses(ExpressionExperiment ee)
      Deprecated.
      Create test Analysis for the given expression experiment.
      Parameters:
      ee - expression experiment to use for creating test analyses
      Returns:
      a collection of persisted analyses that were created
    • countRowsInTable

      protected int countRowsInTable(String tableName)
      Deprecated.
      Count the rows in the given table.
      Parameters:
      tableName - table name to count rows in
      Returns:
      the number of rows in the table
    • deleteFromTables

      protected int deleteFromTables(String... names)
      Deprecated.
      Convenience method for deleting all rows from the specified tables. Use with caution outside of a transaction!
      Parameters:
      names - the names of the tables from which to remove
      Returns:
      the total number of rows deleted from all specified tables
    • getTestPersistentGene

      protected Gene getTestPersistentGene()
      Deprecated.
    • getTestPersistentArrayDesign

      protected ArrayDesign getTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames)
      Deprecated.
      Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects.
    • getTestPersistentArrayDesign

      protected ArrayDesign getTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames, boolean doSequence, boolean readOnly)
      Deprecated.
    • getTestPersistentArrayDesign

      protected ArrayDesign getTestPersistentArrayDesign(List<String> probeNames, Taxon taxon)
      Deprecated.
    • getTestPersistentBasicExpressionExperiment

      protected ExpressionExperiment getTestPersistentBasicExpressionExperiment()
      Deprecated.
    • getTestPersistentBasicExpressionExperiment

      protected ExpressionExperiment getTestPersistentBasicExpressionExperiment(ArrayDesign arrayDesign)
      Deprecated.
    • getTestPersistentBibliographicReference

      protected BibliographicReference getTestPersistentBibliographicReference(String accession)
      Deprecated.
    • getTestPersistentBioAssay

      protected BioAssay getTestPersistentBioAssay(ArrayDesign ad)
      Deprecated.
    • getTestPersistentBioAssay

      protected BioAssay getTestPersistentBioAssay(ArrayDesign ad, BioMaterial bm)
      Deprecated.
    • getTestPersistentBioMaterial

      protected BioMaterial getTestPersistentBioMaterial()
      Deprecated.
    • getTestPersistentBioMaterial

      protected BioMaterial getTestPersistentBioMaterial(Taxon tax)
      Deprecated.
    • getTestPersistentBioSequence

      protected BioSequence getTestPersistentBioSequence()
      Deprecated.
    • getTestPersistentBioSequence

      protected BioSequence getTestPersistentBioSequence(Taxon t)
      Deprecated.
    • getTestNonPersistentBioSequence

      protected BioSequence getTestNonPersistentBioSequence(Taxon t)
      Deprecated.
    • getTestPersistentBlatResult

      protected BlatResult getTestPersistentBlatResult(BioSequence querySequence, Taxon taxon)
      Deprecated.
    • getTestPersistentBlatResult

      protected BlatResult getTestPersistentBlatResult(BioSequence querySequence)
      Deprecated.
    • getTestPersistentCompleteExpressionExperiment

      protected ExpressionExperiment getTestPersistentCompleteExpressionExperiment(boolean readOnly)
      Deprecated.
    • getTestPersistentCompleteExpressionExperimentWithSequences

      protected ExpressionExperiment getTestPersistentCompleteExpressionExperimentWithSequences()
      Deprecated.
    • getNewTestPersistentCompleteExpressionExperiment

      protected ExpressionExperiment getNewTestPersistentCompleteExpressionExperiment()
      Deprecated.
    • getTestPersistentCompleteExpressionExperimentWithSequences

      protected ExpressionExperiment getTestPersistentCompleteExpressionExperimentWithSequences(ExpressionExperiment prototype)
      Deprecated.
    • getTestPersistentContact

      protected Contact getTestPersistentContact()
      Deprecated.
    • getTestPersistentDatabaseEntry

      protected DatabaseEntry getTestPersistentDatabaseEntry()
      Deprecated.
    • getTestPersistentDatabaseEntry

      protected DatabaseEntry getTestPersistentDatabaseEntry(ExternalDatabase ed)
      Deprecated.
    • getTestPersistentDatabaseEntry

      protected DatabaseEntry getTestPersistentDatabaseEntry(String ed)
      Deprecated.
    • getTestPersistentDatabaseEntry

      protected DatabaseEntry getTestPersistentDatabaseEntry(String accession, ExternalDatabase ed)
      Deprecated.
    • getTestPersistentDatabaseEntry

      protected DatabaseEntry getTestPersistentDatabaseEntry(String accession, String ed)
      Deprecated.
    • getTestPersistentExpressionExperiment

      protected ExpressionExperiment getTestPersistentExpressionExperiment()
      Deprecated.
    • getTestPersistentExpressionExperiment

      protected ExpressionExperiment getTestPersistentExpressionExperiment(Taxon taxon)
      Deprecated.
    • getTestPersistentGeneProduct

      protected GeneProduct getTestPersistentGeneProduct(Gene gene)
      Deprecated.
    • getTestPersistentQuantitationType

      protected QuantitationType getTestPersistentQuantitationType()
      Deprecated.
    • resetTestCollectionSize

      protected void resetTestCollectionSize()
      Deprecated.
      Restore to default.
    • runAsAdmin

      protected void runAsAdmin()
      Deprecated.
      See Also:
    • runAsAgent

      protected void runAsAgent()
      Deprecated.
      See Also:
    • runAsUser

      protected void runAsUser(String userName)
      Deprecated.
      See Also:
    • runAsUser

      protected void runAsUser(String userName, boolean createIfMissing)
      Deprecated.
      See Also:
    • runAsAnonymous

      protected void runAsAnonymous()
      Deprecated.
      See Also:
    • setTestCollectionSize

      protected void setTestCollectionSize(int size)
      Deprecated.
      Change the number of elements created in collections (basically controls the size of test data sets). This need not be called unless the test needs larger data sets. Call resetTestCollectionSize after you are done.
      Parameters:
      size - size