Package org.mycore.common
Class MCRTestCase
java.lang.Object
org.mycore.common.MCRTestCase
- Direct Known Subclasses:
MCRAbstractCategoryImplTest
,MCRAbstractMergerTest
,MCRAccessKeyStrategyHelperTest
,MCRAccessKeyTest
,MCRAccessKeyTransformerTest
,MCRBibTeX2MODSTransformerTest
,MCRBindingTest
,MCRCalendarTest
,MCRCategoryIDTest
,MCRCategoryImplTest
,MCRChangeTrackerTest
,MCRCheckPermissionChainResolverTest
,MCRComponentTest
,MCRConditionTransformerTest
,MCRConfigurableInstanceHelperTest
,MCRConfigurationTest
,MCRCoreVersionTest
,MCRCreatedByConditionTest
,MCRCronjobManagerTest
,MCRDataURLTest
,MCRDOIParserTest
,MCRDOIServiceTest
,MCREditorSubmissionTest
,MCREnrichmentTest
,MCREventManagerTest
,MCRExtentMergerTest
,MCRFileSystemEventTest
,MCRGroupClauseTest
,MCRHyphenNormalizerTest
,MCRIdentifierMergerTest
,MCRIDPURLGeneratorTest
,MCRIFS2TestCase
,MCRIPConditionTest
,MCRJanitorEventHandlerBaseTest
,MCRJaxenXPathFactoryTest
,MCRJPATestCase
,MCRLabelTest
,MCRLanguageDetectorTest
,MCRMapObjectIDDOIGeneratorTest
,MCRMergerTest
,MCRMetaAddressTest
,MCRMetaBooleanTest
,MCRMetaClassificationTest
,MCRMetaEnrichedLinkIDTest
,MCRMetaHistoryDateTest
,MCRMetaInstitutionNameTest
,MCRMetaISO8601DateTest
,MCRMetaLangTextTest
,MCRMetaLinkTest
,MCRMetaNumberTest
,MCRMetaPersonNameTest
,MCRMetaXMLTest
,MCRMetsModelHelperTest
,MCRMODSCollectionConditionTest
,MCRMODSDateHelperTest
,MCRMODSDOIMetadataServiceTest
,MCRMODSEmbargoConditionTest
,MCRMODSGenreConditionTest
,MCRModsItemDataProviderTest
,MCRMODSPagesHelperTest
,MCRMODSWrapperTest
,MCRNameMergerTest
,MCRNodeBuilderTest
,MCRObjectIDPoolTest
,MCRObjectMetadataTest
,MCRObjectStaticContentGeneratorTest
,MCRObjectTest
,MCROriginInfoMergerTest
,MCRPIAndPredicateTest
,MCRPIXPathPredicateTest
,MCRProcessableFactoryTest
,MCRProcessableSupplierTest
,MCRQLSearchUtilsTest
,MCRQueryParserTest
,MCRQueryTest
,MCRRegExConditionTest
,MCRRelatedItemMergerTest
,MCRRepeatBindingTest
,MCRRoleConditionTest
,MCRSecureTokenV2FilterConfigTest
,MCRSessionTest
,MCRSolrProxyServletTest
,MCRSwapInsertTargetTest
,MCRTextNormalizerTest
,MCRTextResolverTest
,MCRTitleInfoMergerTest
,MCRTopologicalSortTest
,MCRTransactionableCallableTest
,MCRTransactionableRunnableTest
,MCRTranslationTest
,MCRUploadHelperTest
,MCRURLTest
,MCRUserConditionTest
,MCRUserInformationLookupTest
,MCRUtilsTest
,MCRXEditorTransformerTest
,MCRXEditorValidatorTest
,MCRXMLCleanerTest
,MCRXMLFunctionsTest
,MCRXMLHelperTest
,MCRXMLParserTest
,MCRXPathBuilderTest
,MCRXPathEvaluatorTest
,MCRXSLTransformationTest
,MyCoReWebPageProviderTest
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
bzzz()
Waits 1,1 seconds and does nothingprotected static String
protected InputStream
getResourceAsStream
(String fileName) Retrieve the resource file
Example: /Classname/recource.fileprotected URL
getResourceAsURL
(String fileName) Retrieve the resource file as URI.static void
protected void
Creates a temporary properties file if the system variable MCR.Configuration.File is not set.protected boolean
void
setUp()
initializes MCRConfiguration with an empty property file.void
tearDown()
-
Field Details
-
junitFolder
public static org.junit.rules.TemporaryFolder junitFolder
-
-
Constructor Details
-
MCRTestCase
public MCRTestCase()
-
-
Method Details
-
initBaseDir
- Throws:
IOException
-
setUp
initializes MCRConfiguration with an empty property file. This can be used to test MyCoRe classes without any propties set, using default. You may want to set Properties per TestCase with the set() method ofMCRConfiguration2
- Throws:
Exception
- See Also:
-
tearDown
- Throws:
Exception
-
getTestProperties
-
initProperties
Creates a temporary properties file if the system variable MCR.Configuration.File is not set.- Throws:
IOException
- Thrown if the creation of the temporary properties file failed.
-
getCurrentComponentName
-
isDebugEnabled
protected boolean isDebugEnabled() -
bzzz
protected void bzzz()Waits 1,1 seconds and does nothing -
getResourceAsStream
Retrieve the resource file
Example: /Classname/recource.file- Parameters:
fileName
-- Returns:
- the resource file as InputStream
-
getResourceAsURL
Retrieve the resource file as URI. Example: /Classname/recource.file- Parameters:
fileName
-- Returns:
- the resource file as URL
-