예제 #1
0
        public void ShouldGrowAutomatically()
        {
            var target = new ObservableQueue<string>( 3 );

            for ( var i = 0; i < 10; i++ )
                target.Enqueue( ( i + 1 ).ToString() );

            target.Clear();
            target.TrimExcess();
        }
예제 #2
0
        public void ShouldTrimExcess()
        {
            // arrange
            var target = new ObservableQueue<string>( 10 );
            
            target.Enqueue( "1" );
            target.Enqueue( "2" );
            target.Enqueue( "3" );

            // act
            target.TrimExcess();

            // assert
            // no exception
        }