コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void pruneStrategyExceedsNumberOfEntriesTest()
        public virtual void PruneStrategyExceedsNumberOfEntriesTest()
        {
            //given
            Files = CreateSegmentFiles(10).subList(5, 10);
            EntryBasedLogPruningStrategy strategy = new EntryBasedLogPruningStrategy(7, mock(typeof(LogProvider)));

            //when
            long indexToKeep = strategy.GetIndexToKeep(Segments);

            //then
            assertEquals(4, indexToKeep);
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void onlyOneActiveLogFileTest()
        public virtual void OnlyOneActiveLogFileTest()
        {
            //given
            Files = CreateSegmentFiles(6).subList(4, 6);
            EntryBasedLogPruningStrategy strategy = new EntryBasedLogPruningStrategy(6, mock(typeof(LogProvider)));

            //when
            long indexToKeep = strategy.GetIndexToKeep(Segments);

            //then
            assertEquals(3, indexToKeep);
        }
コード例 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void indexToKeepTest()
        public virtual void IndexToKeepTest()
        {
            // given
            Files = CreateSegmentFiles(10);
            EntryBasedLogPruningStrategy strategy = new EntryBasedLogPruningStrategy(6, mock(typeof(LogProvider)));

            // when
            long indexToKeep = strategy.GetIndexToKeep(Segments);

            // then
            assertEquals(2, indexToKeep);
        }
コード例 #4
0
 public SegmentVisitor(EntryBasedLogPruningStrategy outerInstance)
 {
     this._outerInstance = outerInstance;
 }