public void IndexToArrayConverter(Array value, int position, object expectedResult) { var indexToArrayConverter = new IndexToArrayItemConverter(); var result = indexToArrayConverter.Convert(position, typeof(IndexToArrayItemConverter_Tests), value, CultureInfo.CurrentCulture); Assert.AreEqual(result, expectedResult); }
public void IndexToArrayInValidValuesThrowArgumenOutOfRangeException(object value, object position) { var indexToArrayConverter = new IndexToArrayItemConverter(); Assert.Throws <ArgumentOutOfRangeException>(() => indexToArrayConverter.Convert(position, typeof(IndexToArrayItemConverter), value, CultureInfo.CurrentCulture)); }