public void Verify_Index_Populates_Dropdowns() { // Create mock currency service var stubbedCurrencyService = MockRepository.GenerateStub<ICurrencyService>(); var currencies = new Dictionary<string, string> {{"ABC", "Alphabet Currency"}, {"MTC", "Magic Currency"}}; stubbedCurrencyService.Stub(s => s.GetCurrencies()).Return(currencies); // Call controller action var controller = new CurrencyController(stubbedCurrencyService); var index = (ViewResult)controller.Index(); var indexModel = (IndexModel)index.Model; // Validate Assert.That(indexModel.AvailableCurrencies.Count(), Is.EqualTo(currencies.Count)); }