public virtual void TestByte()
        {
            DeleteBase("testByte.ndb");

            const byte           b   = 127;
            IFileSystemInterface fsi = new FileSystemInterface(new FileIdentification("testByte.ndb"),
                                                               MultiBuffer.DefaultBufferSizeForData,
                                                               new MockSession("test"));

            fsi.SetWritePosition(0, false);
            fsi.WriteByte(b, false);
            fsi.Close();
            fsi = new FileSystemInterface(new FileIdentification("testByte.ndb"),
                                          MultiBuffer.DefaultBufferSizeForData, new MockSession("test"));
            fsi.SetReadPosition(0);
            var b2 = fsi.ReadByte();

            AssertEquals(b, b2);
            fsi.Close();
        }
Esempio n. 2
0
        public virtual void TestByte()
        {
            DeleteBase("testByte.ndb");

            const byte b = 127;
            IFileSystemInterface fsi = new FileSystemInterface(new FileIdentification("testByte.ndb"),
                                                               MultiBuffer.DefaultBufferSizeForData,
                                                               new MockSession("test"));
            fsi.SetWritePosition(0, false);
            fsi.WriteByte(b, false);
            fsi.Close();
            fsi = new FileSystemInterface(new FileIdentification("testByte.ndb"),
                                          MultiBuffer.DefaultBufferSizeForData, new MockSession("test"));
            fsi.SetReadPosition(0);
            var b2 = fsi.ReadByte();
            AssertEquals(b, b2);
            fsi.Close();
        }