Class DefaultFileLoadingStrategyTest
- java.lang.Object
-
- net.shibboleth.oidc.metadata.impl.DefaultFileLoadingStrategyTest
-
public class DefaultFileLoadingStrategyTest extends Object
Tests for the DefaultFileLoadingStrategy.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringEXAMPLE_FILE_CONTENT
-
Constructor Summary
Constructors Constructor Description DefaultFileLoadingStrategyTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestFileDoesNotExist()voidtestFileLoads()voidtestIOErrorOnRead()Test an IO error on reading.voidtestNullFile_NullResponse()voidtestNullResponse_FileNotUpdatedSinceLastLoad()
-
-
-
Field Detail
-
EXAMPLE_FILE_CONTENT
private static final String EXAMPLE_FILE_CONTENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
testFileDoesNotExist
public void testFileDoesNotExist() throws IOException- Throws:
IOException
-
testNullFile_NullResponse
public void testNullFile_NullResponse() throws Exception- Throws:
Exception
-
testNullResponse_FileNotUpdatedSinceLastLoad
public void testNullResponse_FileNotUpdatedSinceLastLoad() throws Exception- Throws:
Exception
-
testIOErrorOnRead
public void testIOErrorOnRead() throws ExceptionTest an IO error on reading. Because we can not mock the internal structure of the File class, this actually dies with anNullPointerExceptioninside theFileInputStreamclass. It does however trigger the correct branch of the logic to exercise the error handling.- Throws:
Exception- on error.
-
-