Example #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void mustCheckForOutOfBoundsWhenReadingDoubleRecord() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void MustCheckForOutOfBoundsWhenReadingDoubleRecord()
        {
            MyRecordFormat format = new MyRecordFormat(this);
            StubPageCursor cursor = new StubPageCursor(0, 4);

            cursor.PutByte(0, ( sbyte )(HEADER_BIT_RECORD_UNIT + HEADER_BIT_FIRST_RECORD_UNIT));
            StubPagedFile pagedFile = new StubPagedFileAnonymousInnerClass(this, cursor);

            format.ShortsPerRecordConflict.AddLast(2);
            format.Read(new MyRecord(this, 0), cursor, RecordLoad.NORMAL, 4);
            assertTrue(cursor.CheckAndClearBoundsFlag());
        }
Example #2
0
 protected internal override void prepareCursor(StubPageCursor cursor)
 {
     cursor.PutByte(0, ( sbyte )HEADER_BIT_RECORD_UNIT);
 }