示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCloseStoreFileOnFailureToOpen()
        public virtual void ShouldCloseStoreFileOnFailureToOpen()
        {
            // GIVEN
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.apache.commons.lang3.mutable.MutableBoolean fired = new org.apache.commons.lang3.mutable.MutableBoolean();
            MutableBoolean        fired = new MutableBoolean();
            FileSystemAbstraction fs    = new DelegatingFileSystemAbstractionAnonymousInnerClass(this, _efs.get(), fired);

            // WHEN
            try
            {
                using (PageCache pageCache = PageCacheRule.getPageCache(fs))
                {
                    NewNodeStore(fs);
                    fail("Should fail");
                }
            }               // Close the page cache here so that we can see failure to close (due to still mapped files)
            catch (Exception e)
            {
                // THEN
                assertTrue(contains(e, typeof(IOException)));
                assertTrue(fired.booleanValue());
            }
        }
 internal virtual bool Clean()
 {
     return(_clean.booleanValue());
 }