Exemple #1
0
 public void FlushCallsFlush_flushToDisk_False()
 {
     using (StoreFlushArgFileStream fs = new StoreFlushArgFileStream(GetTestFilePath(), FileMode.Create))
     {
         fs.Flush();
         Assert.True(fs.LastFlushArg.HasValue);
         Assert.False(fs.LastFlushArg.Value);
     }
 }
Exemple #2
0
        public void SafeFileHandleCallsFlush_flushToDisk_False()
        {
            using (StoreFlushArgFileStream fs = new StoreFlushArgFileStream(GetTestFilePath(), FileMode.Create))
            {
                GC.KeepAlive(fs.SafeFileHandle); // this should call Flush, which should call StoreFlushArgFileStream.Flush(false)

                Assert.True(fs.LastFlushArg.HasValue);
                Assert.False(fs.LastFlushArg.Value);
            }
        }
Exemple #3
0
 public void FlushCallsFlush_flushToDisk_False()
 {
     using (StoreFlushArgFileStream fs = new StoreFlushArgFileStream(GetTestFilePath(), FileMode.Create))
     {
         fs.Flush();
         Assert.True(fs.LastFlushArg.HasValue);
         Assert.False(fs.LastFlushArg.Value);
     }
 }