//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldForAll() public virtual void ShouldForAll() { // given InstanceSelector <string> selector = SelectorFilledWithOrdinal(); // when MutableInt count = new MutableInt(); selector.ForAll(s => count.increment()); // then assertEquals(Enum.GetValues(typeof(IndexSlot)).length, count.intValue()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("ResultOfMethodCallIgnored") @Test public void shouldThrowOnNonInstantiatedForAll() public virtual void ShouldThrowOnNonInstantiatedForAll() { // given InstanceSelector <string> selector = selector(NUMBER, "0"); // when try { selector.ForAll(int?.parseInt); fail("Should have failed"); } catch (System.InvalidOperationException) { // then // good } }