Пример #1
0
        public void GetAllShouldReturnTheCorrectNumberOfItems()
        {
            var targetTypes = typeof(CreditCardType).GetFields(BindingFlags.Static | BindingFlags.Public);

            var all = CreditCardType.GetAll();

            Assert.That(all.Length, Is.EqualTo(targetTypes.Length));
        }
Пример #2
0
        private SelectListItem[] GetCreditCardTypes()
        {
            var creditCards = CreditCardType.GetAll();

            var listItems = _creditCardListItemMapper.MapCreditCardsToListItems(creditCards);

            return(listItems);
        }
Пример #3
0
        public void MapCreditCardsToListItemsShouldReturnValidListOfTypes()
        {
            var creditCardListItemMapper = new CreditCardListItemMapper();

            var selectListItems = creditCardListItemMapper.MapCreditCardsToListItems(CreditCardType.GetAll());

            AsserThatModelHasCorrectCreditCardTypes(selectListItems);
        }