Пример #1
0
        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);
        }
Пример #2
0
        public void IndexToArrayInValidValuesThrowArgumenOutOfRangeException(object value, object position)
        {
            var indexToArrayConverter = new IndexToArrayItemConverter();

            Assert.Throws <ArgumentOutOfRangeException>(() => indexToArrayConverter.Convert(position, typeof(IndexToArrayItemConverter), value, CultureInfo.CurrentCulture));
        }