public void GetAllShouldReturnTheCorrectNumberOfItems() { var targetTypes = typeof(CreditCardType).GetFields(BindingFlags.Static | BindingFlags.Public); var all = CreditCardType.GetAll(); Assert.That(all.Length, Is.EqualTo(targetTypes.Length)); }
private SelectListItem[] GetCreditCardTypes() { var creditCards = CreditCardType.GetAll(); var listItems = _creditCardListItemMapper.MapCreditCardsToListItems(creditCards); return(listItems); }
public void MapCreditCardsToListItemsShouldReturnValidListOfTypes() { var creditCardListItemMapper = new CreditCardListItemMapper(); var selectListItems = creditCardListItemMapper.MapCreditCardsToListItems(CreditCardType.GetAll()); AsserThatModelHasCorrectCreditCardTypes(selectListItems); }