コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRevertToCommittedStateOnTruncation()
        public virtual void ShouldRevertToCommittedStateOnTruncation()
        {
            // given
            _state.append(0, _membersA);
            _state.commit(0);
            _state.append(1, _membersB);
            assertEquals(_state.Latest, _membersB);

            // when
            _state.truncate(1);

            // then
            assertEquals(_state.Latest, _membersA);
            assertEquals(3, _state.Ordinal);
        }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void truncate(long fromIndex) throws java.io.IOException
        public override void Truncate(long fromIndex)
        {
            if (_state.truncate(fromIndex))
            {
                _storage.persistStoreData(_state);
                UpdateMemberSets();
            }
        }