I am trying to unit test a function that returns a SelectList.
How can I get an element from a SelectList to make sure my model is built correctly?
mySelectList.Items.First().DataValue
or something else.
Just use mySelectList.ElementAt(n) to get the nth SelectListItem.
mySelectList.ElementAt(n)