예제 #1
0
        /// <exception cref="System.Exception"></exception>
        public virtual void TestBoolean()
        {
            bool b1 = true;
            bool b2 = false;

            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 + "testBoolean.neodatis", true, true, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
                                                                                      ());
            fsi.SetWritePosition(0, false);
            fsi.WriteBoolean(b1, false);
            fsi.WriteBoolean(b2, false);
            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
                                                                                           + "testBoolean.neodatis", false, false, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
                                                                                               ());
            fsi.SetReadPosition(0);
            bool b11 = fsi.ReadBoolean();
            bool b22 = fsi.ReadBoolean();

            AssertEquals(b1, b11);
            AssertEquals(b2, b22);
            fsi.Close();
            DeleteBase("testBoolean.neodatis");
        }
예제 #2
0
		/// <exception cref="System.Exception"></exception>
		public virtual void TestBoolean()
		{
			bool b1 = true;
			bool b2 = false;
			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 + "testBoolean.neodatis", true, true, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
				());
			fsi.SetWritePosition(0, false);
			fsi.WriteBoolean(b1, false);
			fsi.WriteBoolean(b2, false);
			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
				 + "testBoolean.neodatis", false, false, NeoDatis.Odb.OdbConfiguration.GetDefaultBufferSizeForData
				());
			fsi.SetReadPosition(0);
			bool b11 = fsi.ReadBoolean();
			bool b22 = fsi.ReadBoolean();
			AssertEquals(b1, b11);
			AssertEquals(b2, b22);
			fsi.Close();
			DeleteBase("testBoolean.neodatis");
		}