public class SetCacheDurationStageTest extends BaseDOMTest
SetCacheDurationStage.testingClass| Constructor and Description |
|---|
SetCacheDurationStageTest()
Constructor sets class under test.
|
| Modifier and Type | Method and Description |
|---|---|
private long |
fetchDuration(Element descriptor)
Helper method to extract the value of a descriptor's XML duration attribute in milliseconds.
|
void |
testNegativeDuration()
Tests that the stage properly rejects negative durations.
|
void |
testWithExistingCacheDuration()
Tests that the duration is properly set on an element when it already contains a duration.
|
void |
testWithNonDescriptorMetadataElement()
Tests that the stage ignores elements which are not EntityDescriptors or EntitiesDescriptors.
|
void |
testWithoutExistingCacheDuration()
Tests that the duration is properly set on an element when it doesn't already contain a duration.
|
assertXMLIdentical, countErrors, getParserPool, readDOMItem, readXMLData, setUpclassRelativeResource, getClasspathResource, packageRelativeResource, simpleClassRelativeNamepublic SetCacheDurationStageTest()
private long fetchDuration(Element descriptor) throws DatatypeConfigurationException
descriptor - EntitiesDescriptor or EntityDescriptor to pull the attribute fromDatatypeConfigurationException - if a DatatypeFactory can't be constructedpublic void testWithoutExistingCacheDuration()
throws Exception
Exception - thrown if there is an errorpublic void testWithExistingCacheDuration()
throws Exception
Exception - thrown if there is an errorpublic void testWithNonDescriptorMetadataElement()
throws Exception
Exception - thrown if there is an errorpublic void testNegativeDuration()
Copyright © 1999–2015. All rights reserved.