Example #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldPerformActionOnAll()
        public virtual void ShouldPerformActionOnAll()
        {
            // given
            System.Func <IndexSlot, string> factory  = SlotToStringFunction();
            LazyInstanceSelector <string>   selector = new LazyInstanceSelector <string>(factory);

            selector.Select(STRING);

            // when
            System.Action <string> consumer = mock(typeof(System.Action));
            selector.ForAll(consumer);

            // then
            foreach (IndexSlot slot in Enum.GetValues(typeof(IndexSlot)))
            {
                verify(consumer, times(1)).accept(slot.ToString());
            }
            verifyNoMoreInteractions(consumer);
        }