public void IEnumerableFunctionality_OnNonEnumerableWrappedObject() { var reflectedObject = new ReflectedObject(42); try { reflectedObject.GetEnumerator().MoveNext(); Assert.Fail("expected exception not thrown"); } catch (NotSupportedException notSupportedException) { Assert.That(notSupportedException.Message, Is.EqualTo("The reflected object 'System.Int32' is not enumerable.")); } }
public void IEnumerableFunctionality_OnNonEnumerableWrappedObject() { var reflectedObject = new ReflectedObject (42); try { reflectedObject.GetEnumerator().MoveNext(); Assert.Fail ("expected exception not thrown"); } catch (NotSupportedException notSupportedException) { Assert.That (notSupportedException.Message, Is.EqualTo ("The reflected object 'System.Int32' is not enumerable.")); } }