//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFlatMap() public virtual void ShouldFlatMap() { // given InstanceSelector <string> selector = SelectorFilledWithOrdinal(); // when IList <int> actual = Iterables.asList(selector.Transform(int?.parseInt)); IList <int> expected = java.util.Enum.GetValues(typeof(IndexSlot)).Select(Enum.ordinal).ToList(); // then assertEquals(expected.Count, actual.Count); foreach (int?i in expected) { assertTrue(actual.Contains(i)); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldThrowOnNonInstantiatedFlatMap() public virtual void ShouldThrowOnNonInstantiatedFlatMap() { // given InstanceSelector <string> selector = selector(NUMBER, "0"); // when try { selector.Transform(int?.parseInt); fail("Should have failed"); } catch (System.InvalidOperationException) { // then // good } }