Пример #1
0
        /// <exception cref="System.IO.IOException"></exception>
        public virtual void TestReadOnlyLocked()
        {
            byte[]           bytes = new byte[1];
            RandomAccessFile raf   = RandomAccessFileFactory.NewRandomAccessFile(TempFile(), true
                                                                                 , true);

            Assert.Expect(typeof(IOException), new _ICodeBlock_43(raf, bytes));
            raf.Close();
        }
        /// <exception cref="System.IO.IOException"></exception>
        public virtual void TestReadOnlyUnLocked()
        {
            var bytes = new byte[1];
            var raf   = RandomAccessFileFactory.NewRandomAccessFile(TempFile(), true
                                                                    , false);

            Assert.Expect(typeof(IOException), new _ICodeBlock_54(raf, bytes));
            raf.Close();
        }
Пример #3
0
        /// <exception cref="System.IO.IOException"></exception>
        public virtual void TestLockDatabaseFileFalse()
        {
            IObjectContainer container = OpenObjectContainer(false);
            RandomAccessFile raf       = RandomAccessFileFactory.NewRandomAccessFile(TempFile(), false
                                                                                     , false);

            byte[] bytes = new byte[1];
            raf.Read(bytes);
            raf.Close();
            container.Close();
        }
Пример #4
0
 /// <exception cref="System.Exception"></exception>
 public void Run()
 {
     RandomAccessFileFactory.NewRandomAccessFile(this._enclosing.TempFile(), false, true
                                                 );
 }