public IActionResult Task4Result(
            [ModelBinder(typeof(IntArrayModelBinder))] IEnumerable <int> firstCollection,
            [ModelBinder(typeof(IntArrayModelBinder))] IEnumerable <int> secondCollection)
        {
            var numProcessor = new NumericCollectionsProcessor();
            var result       = numProcessor.GetIntersectionsAndSquares(firstCollection, secondCollection);

            return(PartialView(result));
        }
Пример #2
0
        void GetIntersectionsAndSquares_positive_scenario(IEnumerable <int> firstCollection, IEnumerable <int> secondCollection, IEnumerable <KeyValuePair <int, int> > expectedCollection)
        {
            var result = processor.GetIntersectionsAndSquares(firstCollection, secondCollection).OrderBy(x => x.Key);

            Assert.Equal(expectedCollection, result);
        }