Esempio n. 1
0
        public virtual void TestBoolean()
        {
            DeleteBase("testBoolean.ndb");

            const bool b1 = true;
            const bool b2 = false;
            IFileSystemInterface fsi = new FileSystemInterface(new FileIdentification("testBoolean.ndb"),
                                                               MultiBuffer.DefaultBufferSizeForData,
                                                               new MockSession("test"));
            fsi.SetWritePosition(0, false);
            fsi.WriteBoolean(b1, false);
            fsi.WriteBoolean(b2, false);
            fsi.Close();
            fsi = new FileSystemInterface(new FileIdentification("testBoolean.ndb"),
                                          MultiBuffer.DefaultBufferSizeForData, new MockSession("test"));
            fsi.SetReadPosition(0);
            var b11 = fsi.ReadBoolean();
            var b22 = fsi.ReadBoolean();
            AssertEquals(b1, b11);
            AssertEquals(b2, b22);
            fsi.Close();
        }
        public virtual void TestBoolean()
        {
            DeleteBase("testBoolean.ndb");

            const bool           b1  = true;
            const bool           b2  = false;
            IFileSystemInterface fsi = new FileSystemInterface(new FileIdentification("testBoolean.ndb"),
                                                               MultiBuffer.DefaultBufferSizeForData,
                                                               new MockSession("test"));

            fsi.SetWritePosition(0, false);
            fsi.WriteBoolean(b1, false);
            fsi.WriteBoolean(b2, false);
            fsi.Close();
            fsi = new FileSystemInterface(new FileIdentification("testBoolean.ndb"),
                                          MultiBuffer.DefaultBufferSizeForData, new MockSession("test"));
            fsi.SetReadPosition(0);
            var b11 = fsi.ReadBoolean();
            var b22 = fsi.ReadBoolean();

            AssertEquals(b1, b11);
            AssertEquals(b2, b22);
            fsi.Close();
        }