Package org.opensaml.core.xml.persist
Class FilesystemLoadSaveManagerTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.core.xml.persist.FilesystemLoadSaveManagerTest
-
public class FilesystemLoadSaveManagerTest extends XMLObjectBaseTestCase
-
-
Field Summary
Fields Modifier and Type Field Description private FilebaseDirprivate Function<String,List<String>>intermediateDirectoryStrategyprivate org.slf4j.Loggerlogprivate FilesystemLoadSaveManager<SimpleXMLObject>manager-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description FilesystemLoadSaveManagerTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildTargetFileFromKey()voidbuildTargetFileFromKeyWithIntermediateDirs()protected <T extends XMLObject>
TbuildXMLObject(QName name, boolean withObjectSource)voidcheckCheckModifyTimeTracking()voidctorBaseDirPathExistsButNotADirectory()voidctorCreateDirectory()voidctorEmptyPathString()voidctorNullFile()voidctorPathTrimming()voidctorRelativeDir()voidemptyDir()voiditerator()private FileparentPath(File base, String... dirs)private voidresetBaseDir()voidsaveLoadUpdateRemove(Boolean buildWithObjectSourceByteArray)Object[][]saveLoadUpdateRemoveParams()voidsaveLoadUpdateRemoveWithIntermediateDirs(Boolean buildWithObjectSourceByteArray)voidsetUp()voidtargetExistsButIsNotAFile()voidtargetKeyIsEmpty()voidtargetKeyIsNull()voidtearDown()private voidtestState(Set<String> expectedKeys)-
Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
log
private org.slf4j.Logger log
-
baseDir
private File baseDir
-
manager
private FilesystemLoadSaveManager<SimpleXMLObject> manager
-
-
Method Detail
-
setUp
@BeforeMethod public void setUp() throws IOException- Throws:
IOException
-
tearDown
@AfterMethod public void tearDown() throws IOException- Throws:
IOException
-
emptyDir
public void emptyDir() throws IOException- Throws:
IOException
-
saveLoadUpdateRemoveParams
@DataProvider public Object[][] saveLoadUpdateRemoveParams()
-
saveLoadUpdateRemove
public void saveLoadUpdateRemove(Boolean buildWithObjectSourceByteArray) throws IOException
- Throws:
IOException
-
saveLoadUpdateRemoveWithIntermediateDirs
public void saveLoadUpdateRemoveWithIntermediateDirs(Boolean buildWithObjectSourceByteArray) throws IOException
- Throws:
IOException
-
checkCheckModifyTimeTracking
public void checkCheckModifyTimeTracking() throws IOException- Throws:
IOException
-
buildTargetFileFromKey
public void buildTargetFileFromKey() throws IOException- Throws:
IOException
-
buildTargetFileFromKeyWithIntermediateDirs
public void buildTargetFileFromKeyWithIntermediateDirs() throws IOException- Throws:
IOException
-
targetExistsButIsNotAFile
public void targetExistsButIsNotAFile() throws IOException- Throws:
IOException
-
targetKeyIsNull
public void targetKeyIsNull() throws IOException- Throws:
IOException
-
targetKeyIsEmpty
public void targetKeyIsEmpty() throws IOException- Throws:
IOException
-
ctorCreateDirectory
public void ctorCreateDirectory() throws IOException- Throws:
IOException
-
ctorPathTrimming
public void ctorPathTrimming() throws IOException- Throws:
IOException
-
ctorEmptyPathString
public void ctorEmptyPathString()
-
ctorNullFile
public void ctorNullFile()
-
ctorRelativeDir
public void ctorRelativeDir()
-
ctorBaseDirPathExistsButNotADirectory
public void ctorBaseDirPathExistsButNotADirectory() throws IOException- Throws:
IOException
-
iterator
public void iterator() throws IOException- Throws:
IOException
-
testState
private void testState(Set<String> expectedKeys) throws IOException
- Throws:
IOException
-
resetBaseDir
private void resetBaseDir() throws IOException- Throws:
IOException
-
-