Ejemplo n.º 1
0
        /// <exception cref="System.Exception"></exception>
        public virtual void TestLong()
        {
            long i = 259999865;

            NeoDatis.Odb.Core.Layers.Layer3.Engine.IFileSystemInterface fsi = new NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.LocalFileSystemInterface
                                                                                  ("data", new NeoDatis.Odb.Core.Mock.MockSession("test"), NeoDatis.Odb.Test.ODBTest
                                                                                  .Directory + "testLong.neodatis", true, true, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
                                                                                      ());
            fsi.SetWritePosition(0, false);
            fsi.WriteLong(i, false, "i", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
                          .PointerWriteAction);
            fsi.Close();
            fsi = new NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.LocalFileSystemInterface("data"
                                                                                           , new NeoDatis.Odb.Core.Mock.MockSession("test"), NeoDatis.Odb.Test.ODBTest.Directory
                                                                                           + "testLong.neodatis", false, false, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
                                                                                               ());
            fsi.SetReadPosition(0);
            long i2 = fsi.ReadLong();

            AssertEquals(i, i2);
            fsi.Close();
            DeleteBase("testLong.neodatis");
        }
Ejemplo n.º 2
0
		/// <exception cref="System.Exception"></exception>
		public virtual void TestLong()
		{
			long i = 259999865;
			NeoDatis.Odb.Core.Layers.Layer3.Engine.IFileSystemInterface fsi = new NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.LocalFileSystemInterface
				("data", new NeoDatis.Odb.Core.Mock.MockSession("test"), NeoDatis.Odb.Test.ODBTest
				.Directory + "testLong.neodatis", true, true, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
				());
			fsi.SetWritePosition(0, false);
			fsi.WriteLong(i, false, "i", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
				.PointerWriteAction);
			fsi.Close();
			fsi = new NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.LocalFileSystemInterface("data"
				, new NeoDatis.Odb.Core.Mock.MockSession("test"), NeoDatis.Odb.Test.ODBTest.Directory
				 + "testLong.neodatis", false, false, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
				());
			fsi.SetReadPosition(0);
			long i2 = fsi.ReadLong();
			AssertEquals(i, i2);
			fsi.Close();
			DeleteBase("testLong.neodatis");
		}