Package ubic.gemma.core.util.test
Class BaseSpringContextTest
java.lang.Object
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
ubic.gemma.core.util.test.BaseTest
ubic.gemma.core.util.test.BaseIntegrationTest
ubic.gemma.core.util.test.BaseSpringContextTest
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
AbstractArrayDesignProcessingTest,AbstractGeoServiceTest,AclAdviceTest,AclAuthorizationTest,AclCollectionBeforeTest,AclCriteriaUtilsTest,AclQueryUtilsTest,ArrayDesignMergeServiceTest,ArrayDesignReportServiceTest,AuditAdviceTest,AuditEventServiceTest,AuditTrailDaoTest,AuditTrailServiceImplTest,BibliographicReferenceServiceImplTest,BibliographicReferenceServiceTest,BioAssayServiceTest,BioMaterialServiceTest,BioSequencePersistTest,BlacklistedEntityServiceTest,BlacklistTest,BlatAssociationServiceTest,BlatResultServiceTest,CharacteristicServiceTest,CompositeSequenceServiceTest,CuratableValueObjectTest,DatabaseEntryDaoImplTest,ExecutingTaskTest,ExperimentalDesignImportDuplicateValueTest,ExperimentalDesignImporterTest,ExpressionAnalysisResultSetServiceTest,ExpressionExperimentDeleteTest,ExpressionExperimentReportServiceTest,ExpressionExperimentServiceIntegrationTest,ExpressionExperimentSetServiceTest,ExpressionExperimentSetValueObjectHelperTest,ExpressionExperimentSubSetServiceTest,ExternalDatabaseServiceTest,ExternalFileGeneLoaderServiceTest,FactorValueServiceIntegrationTest,Gene2GeneCoexpressionServiceTest,GeneDiffExMetaAnalysisServiceTest,GeneMultifunctionalityPopulationServiceTest,GeneSetServiceTest,GeneSetValueObjectHelperTest,GenomePersisterTest,GeoBrowserServiceTest,LinkAnalysisServiceTest,ManualAuthenticationProcessingTest,NCBIGene2GOAssociationParserTest,NCBIGeneLoadingTest,PersisterTest,PrincipalTest,RetryTest,SampleCoexpressionAnalysisServiceTest,SearchServiceIntegrationTest,SecureValueObjectAuthorizationTest,SecurityServiceTest,SimpleExpressionDataLoaderServiceTest,SplitExperimentTest,StrictBeanDefinitionValidatorTest,TaxonLoaderTest,TaxonUtilsTest,TwoChannelMissingValuesTest,TwoWayAnovaWithInteractionTest2,UserGroupServiceTest,WhatsNewServiceTest
Deprecated.
Add a few utilities on top of
BaseIntegrationTest.- Author:
- pavlidis
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExternalDatabaseServiceDeprecated.protected final org.apache.commons.logging.LogDeprecated.protected PersisterHelperDeprecated.org.mockito.junit.MockitoRuleDeprecated.This allows the usage ofMockannotation to create mocks.protected TaxonServiceDeprecated.protected PersistentDummyObjectHelperDeprecated.Fields inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
applicationContext, logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<Analysis> Deprecated.Create testAnalysisfor the given expression experiment.protected intcountRowsInTable(String tableName) Deprecated.Count the rows in the given table.protected intdeleteFromTables(String... names) Deprecated.Convenience method for deleting all rows from the specified tables.protected org.springframework.jdbc.core.JdbcTemplateDeprecated.protected ExpressionExperimentDeprecated.Deprecated.Obtain a taxon by its common name.protected BioSequenceDeprecated.protected ArrayDesigngetTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames) Deprecated.Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects.protected ArrayDesigngetTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames, boolean doSequence, boolean readOnly) Deprecated.Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects.protected ArrayDesigngetTestPersistentArrayDesign(List<String> probeNames, Taxon taxon) Deprecated.Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects.protected ExpressionExperimentDeprecated.protected ExpressionExperimentgetTestPersistentBasicExpressionExperiment(ArrayDesign arrayDesign) Deprecated.protected BibliographicReferencegetTestPersistentBibliographicReference(String accession) Deprecated.protected BioAssayDeprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.protected BioAssayDeprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.protected BioMaterialDeprecated.protected BioMaterialDeprecated.protected BioSequenceDeprecated.protected BioSequenceDeprecated.getTestPersistentBioSequence2GeneProducts(BioSequence bioSequence) Deprecated.protected BlatResultgetTestPersistentBlatResult(BioSequence querySequence) Deprecated.protected BlatResultgetTestPersistentBlatResult(BioSequence querySequence, Taxon taxon) Deprecated.protected ExpressionExperimentgetTestPersistentCompleteExpressionExperiment(boolean readOnly) Deprecated.Convenience method to get a (fairly) complete randomly generated persisted expression experiment.protected ExpressionExperimentDeprecated.Convenience method to get a (fairly) complete randomly generated persisted expression experiment.protected ExpressionExperimentDeprecated.protected ContactDeprecated.Convenience method to provide a Contact that can be used to fill non-nullable associations in test objects.protected DatabaseEntryDeprecated.Get a database entry from a fictitious database.protected DatabaseEntryDeprecated.protected DatabaseEntrygetTestPersistentDatabaseEntry(String accession, String ed) Deprecated.protected DatabaseEntrygetTestPersistentDatabaseEntry(String accession, ExternalDatabase ed) Deprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.protected DatabaseEntryDeprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.protected ExpressionExperimentDeprecated.Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects.protected ExpressionExperimentDeprecated.Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects.protected GeneDeprecated.getTestPersistentGene(Taxon taxon) Deprecated.protected GeneProductDeprecated.protected QuantitationTypeDeprecated.Convenience method to provide a QuantitationType that can be used to fill non-nullable associations in test objects.Deprecated.Convenience shortcut for RandomStringUtils.insecure().nextAlphabetic( 10 ) (or something similar to that)protected voidDeprecated.Restore to default.protected voidDeprecated.protected voidDeprecated.protected voidDeprecated.protected voidDeprecated.protected voidDeprecated.protected voidsetTestCollectionSize(int size) Deprecated.Change the number of elements created in collections (basically controls the size of test data sets).Methods inherited from class ubic.gemma.core.util.test.BaseIntegrationTest
setUpAuthentication, tearDownSecurityContextMethods inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
setApplicationContext
-
Field Details
-
log
protected final org.apache.commons.logging.Log logDeprecated. -
rule
public org.mockito.junit.MockitoRule ruleDeprecated.This allows the usage ofMockannotation to create mocks. -
externalDatabaseService
Deprecated. -
persisterHelper
Deprecated. -
taxonService
Deprecated. -
testHelper
Deprecated.
-
-
Constructor Details
-
BaseSpringContextTest
public BaseSpringContextTest()Deprecated.
-
-
Method Details
-
getJdbcTemplate
protected org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()Deprecated. -
getTaxon
Deprecated.Obtain a taxon by its common name.See
sql/init-data.sqlfor a list of available taxa to use in tests. -
getTestPersistentGene
Deprecated. -
getTestPersistentBioSequence2GeneProducts
public Set<BioSequence2GeneProduct> getTestPersistentBioSequence2GeneProducts(BioSequence bioSequence) Deprecated. -
randomName
Deprecated.Convenience shortcut for RandomStringUtils.insecure().nextAlphabetic( 10 ) (or something similar to that)- Returns:
- random alphabetic string
-
addTestAnalyses
Deprecated.Create testAnalysisfor the given expression experiment.- Parameters:
ee- expression experiment to use for creating test analyses- Returns:
- a collection of persisted analyses that were created
-
countRowsInTable
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
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
Deprecated. -
getTestPersistentArrayDesign
Deprecated.Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects. The ArrayDesign is provided with some CompositeSequence DesignElements if desired. If composite sequences are created, they are each associated with a single generated Reporter.- Parameters:
numCompositeSequences- The number of CompositeSequences to populate the ArrayDesign with.randomNames- If true, probe names will be random strings; otherwise they will be 0_at....N_at- Returns:
- array design
-
getTestPersistentArrayDesign
protected ArrayDesign getTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames, boolean doSequence, boolean readOnly) Deprecated.Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects. The ArrayDesign is provided with some CompositeSequence DesignElements if desired. If composite sequences are created, they are each associated with a single generated Reporter.- Parameters:
numCompositeSequences- The number of CompositeSequences to populate the ArrayDesign with.randomNames- If true, probe names will be random strings; otherwise they will be 0_at....N_atdoSequence- add sequences to the array design that is created. Faster to avoid if you can.readOnly- read only- Returns:
- array design
-
getTestPersistentArrayDesign
Deprecated.Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects.- Parameters:
probeNames- will be assigned to each CompositeSequence in the ArrayDesigntaxon- of the ArrayDesign- Returns:
- ArrayDesign with no TechnologyType
-
getTestPersistentBasicExpressionExperiment
Deprecated.- Returns:
- EE with no data; just bioassays, biomaterials, quantitation types and (minimal) array designs.
-
getTestPersistentBasicExpressionExperiment
Deprecated.- Parameters:
arrayDesign- platform- Returns:
- EE with no data; just bioassays, biomaterials, quantitation types and provided arrayDesign
-
getTestPersistentBibliographicReference
Deprecated. -
getTestPersistentBioAssay
Deprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.- Parameters:
ad- paltform- Returns:
- bio assay
-
getTestPersistentBioAssay
Deprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.- Parameters:
ad- platformbm- material- Returns:
- bio assay
-
getTestPersistentBioMaterial
Deprecated. -
getTestPersistentBioMaterial
Deprecated. -
getTestPersistentBioSequence
Deprecated. -
getTestPersistentBioSequence
Deprecated. -
getTestNonPersistentBioSequence
Deprecated. -
getTestPersistentBlatResult
Deprecated. -
getTestPersistentBlatResult
Deprecated. -
getTestPersistentCompleteExpressionExperiment
Deprecated.Convenience method to get a (fairly) complete randomly generated persisted expression experiment.- Parameters:
readOnly- If the test only needs to read, a new data set might not be created.- Returns:
- EE
-
getTestPersistentCompleteExpressionExperimentWithSequences
Deprecated.Convenience method to get a (fairly) complete randomly generated persisted expression experiment.- Returns:
- EE
-
getNewTestPersistentCompleteExpressionExperiment
Deprecated. -
getTestPersistentCompleteExpressionExperimentWithSequences
protected ExpressionExperiment getTestPersistentCompleteExpressionExperimentWithSequences(ExpressionExperiment prototype) Deprecated.- Parameters:
prototype- used to choose the platform- Returns:
- EE
-
getTestPersistentContact
Deprecated.Convenience method to provide a Contact that can be used to fill non-nullable associations in test objects.- Returns:
- Contact
-
getTestPersistentDatabaseEntry
Deprecated.Get a database entry from a fictitious database.- Returns:
- Db entry
-
getTestPersistentDatabaseEntry
Deprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects. The accession and ExternalDatabase name are set to random strings.- Parameters:
ed- external Db- Returns:
- Db entry
-
getTestPersistentDatabaseEntry
Deprecated. -
getTestPersistentDatabaseEntry
Deprecated.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects. The accession and ExternalDatabase name are set to random strings.- Parameters:
accession- accessioned- database- Returns:
- Db entry
-
getTestPersistentDatabaseEntry
Deprecated. -
getTestPersistentExpressionExperiment
Deprecated.Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects. This implementation does NOT fill in associations of the created object.- Returns:
- EE
-
getTestPersistentExpressionExperiment
Deprecated.Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects. This implementation does NOT fill in associations of the created object except for the creation of persistent BioMaterials and BioAssays so that database taxon lookups for this experiment will work.- Parameters:
taxon- taxon- Returns:
- EE
-
getTestPersistentGeneProduct
Deprecated. -
getTestPersistentQuantitationType
Deprecated.Convenience method to provide a QuantitationType that can be used to fill non-nullable associations in test objects.- Returns:
- QT
-
resetTestCollectionSize
protected void resetTestCollectionSize()Deprecated.Restore to default. -
runAsAdmin
protected void runAsAdmin()Deprecated.- See Also:
-
runAsAgent
protected void runAsAgent()Deprecated.- See Also:
-
runAsUser
Deprecated.- See Also:
-
runAsUser
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
-
BaseIntegrationTestfor new tests