public void Verify_Destination_Currency_Properly_Calculated() { // Create mock currency service var stubbedCurrencyService = MockRepository.GenerateStub<ICurrencyService>(); var rate = (decimal)0.5d; stubbedCurrencyService.Stub(s => s.GetExchangeRate("ABC", "MTG")).Return(rate); // Call controller action var controller = new CurrencyController(stubbedCurrencyService); var indexModel = new IndexModel { SourceCurrency = "ABC", DestinationCurrency = "MTG", SourceAmount = 15 }; var result = (ContentResult)controller.Convert(indexModel); // Validate Assert.That(result.Content, Is.EqualTo((indexModel.SourceAmount * rate).ToString())); }