Пример #1
0
        private string?GetComparedItemString(IEnumerable <object> actualList, IEnumerable <object> expectedList, int itemPosition)
        {
            if (expectedList.Count() <= itemPosition)
            {
                return(_itemDifferenceHighlighter.HighlightItem(actualList.ElementAt(itemPosition).ToStringAwesomely()));
            }

            if (actualList.Count() <= itemPosition)
            {
                return(ItemDifferenceHighlighter.HighlightCharacter);
            }

            if (Is.Equal(actualList.ElementAt(itemPosition), expectedList.ElementAt(itemPosition)))
            {
                return(actualList.ElementAt(itemPosition).ToStringAwesomely());
            }

            return(_itemDifferenceHighlighter.HighlightItem(actualList.ElementAt(itemPosition).ToStringAwesomely()));
        }