Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void forEach()
        internal virtual void ForEach()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.eclipse.collections.api.block.procedure.primitive.LongProcedure consumer = mock(org.eclipse.collections.api.block.procedure.primitive.LongProcedure.class);
            LongProcedure consumer = mock(typeof(LongProcedure));

            _set.addAll(1, 2, 100, 200);
            _set.forEach(consumer);

            verify(consumer).accept(eq(1L));
            verify(consumer).accept(eq(2L));
            verify(consumer).accept(eq(100L));
            verify(consumer).accept(eq(200L));
            verifyNoMoreInteractions(consumer);
        }