This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push: new 9db9c93 Add JUnit assertions. 9db9c93 is described below commit 9db9c93fca556a6b86450bfcae41d4f51aaa90be Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Jan 30 16:22:37 2019 -0500 Add JUnit assertions. --- .../org/apache/commons/vfs2/cache/NullFilesCacheTests.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTests.java index a399a78..0f9548b 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTests.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/cache/NullFilesCacheTests.java @@ -20,6 +20,9 @@ import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystem; import org.apache.commons.vfs2.FilesCache; +import org.apache.commons.vfs2.impl.DefaultFileSystemManager; +import org.junit.Assert; + /** * Tests for {@link NullFilesCache} used by {@link NullFilesCacheTestCase}. @@ -27,6 +30,7 @@ import org.apache.commons.vfs2.FilesCache; public class NullFilesCacheTests extends AbstractFilesCacheTestsBase { public void testFilesCache() throws Exception { final FileObject scratchFolder = getWriteFolder(); + Assert.assertNotNull("This test should not have a null FileObject scratch folder", scratchFolder); final FileObject dir1 = scratchFolder.resolveFile("dir1"); final FileObject dir1_2 = scratchFolder.resolveFile("dir1"); @@ -36,9 +40,10 @@ public class NullFilesCacheTests extends AbstractFilesCacheTestsBase { @Override public void testBasicCacheOps() throws Exception { + DefaultFileSystemManager manager = getManager(); + Assert.assertNotNull("This test should not have a null DefaultFileSystemManager", manager); // the basic test looks different for a null cache: - - final FilesCache cache = getManager().getFilesCache(); + final FilesCache cache = manager.getFilesCache(); final FileObject fo = getWriteFolder().resolveFile("dir1"); final FileName fn = fo.getName(); final FileSystem fs = fo.getFileSystem(); @@ -57,6 +62,8 @@ public class NullFilesCacheTests extends AbstractFilesCacheTestsBase { } public void testClass() { - assertTrue(getManager().getFilesCache() instanceof NullFilesCache); + DefaultFileSystemManager manager = getManager(); + Assert.assertNotNull("This test should not have a null DefaultFileSystemManager", manager); + assertTrue(manager.getFilesCache() instanceof NullFilesCache); } }