Package ubic.gemma.web.util
Class BaseSpringWebTest
java.lang.Object
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
ubic.gemma.core.util.test.BaseTest
ubic.gemma.web.util.BaseWebIntegrationTest
ubic.gemma.web.util.BaseSpringWebTest
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
AuditControllerTest,BibRefControllerTest,ExperimentalDesignControllerIntegrationTest,ExpressionExperimentControllerTest,PubMedQueryControllerTest,RssFeedControllerTest,SecurityControllerTest
Deprecated.
Class to extend for tests of controllers et al. that need a spring context. Provides convenience methods for dealing
with mock requests and responses. Also provides a safe port to send email on for testing (for example, using
dumbster)
- Author:
- pavlidis
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExternalDatabaseServiceDeprecated.protected final org.apache.commons.logging.LogDeprecated.protected TaxonServiceDeprecated.protected PersistentDummyObjectHelperDeprecated.Fields inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Obtain a taxon by its common name.protected ExpressionExperimentDeprecated.protected BibliographicReferencegetTestPersistentBibliographicReference(String accession) Deprecated.getTestPersistentBioSequence2GeneProducts(BioSequence bioSequence) Deprecated.protected ExpressionExperimentgetTestPersistentCompleteExpressionExperiment(boolean readOnly) Deprecated.Convenience method to get a (fairly) complete randomly generated persisted expression experiment.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.getTestPersistentGene(Taxon taxon) Deprecated.Deprecated.Convenience shortcut for RandomStringUtils.insecure().nextAlphabetic( 10 ) (or something similar to that)protected voidDeprecated.Methods inherited from class ubic.gemma.web.util.BaseWebIntegrationTest
perform, setUpAuthentication, tearDownSecurityContextMethods inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
setApplicationContext
-
Field Details
-
log
protected final org.apache.commons.logging.Log logDeprecated. -
externalDatabaseService
Deprecated. -
taxonService
Deprecated. -
testHelper
Deprecated.
-
-
Constructor Details
-
BaseSpringWebTest
public BaseSpringWebTest()Deprecated.
-
-
Method Details
-
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
-
getTestPersistentBasicExpressionExperiment
Deprecated.- Returns:
- EE with no data; just bioassays, biomaterials, quantitation types and (minimal) array designs.
-
getTestPersistentBibliographicReference
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
-
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.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
-
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
-
runAsUser
Deprecated.- See Also:
-
BaseWebIntegrationTestfor new tests