예제 #1
0
 private void AssertCursor <T1>(ContinuableArrayCursor <T1> cursor, params object[][] arrays)
 {
     foreach (object[] array in arrays)
     {
         foreach (object obj in array)
         {
             assertTrue(cursor.Next());
             assertEquals(obj, cursor.Get());
         }
     }
     assertFalse(cursor.Next());
 }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void callGetAfterNextReturnsFalseShouldThrowIllegalStateException()
        public virtual void CallGetAfterNextReturnsFalseShouldThrowIllegalStateException()
        {
            // given
            ContinuableArrayCursor <int> cursor = new ContinuableArrayCursor <int>(Supply(new int?[0]));

            // when
            assertFalse(cursor.Next());

            // then
            Thrown.expect(typeof(System.InvalidOperationException));
            cursor.Get();
        }