Beispiel #1
0
        public void Should_Read_Bands_And_Return_Correct_Interest()
        {
            var readerFactory = new TextReaderFactory(@"IntegrationTests\test_data\bands.txt");
            var bandsReader   = new CSVBandsReader(readerFactory, "|");

            using (var bandsCache = new BandsCache(bandsReader))
            {
                var interestRateReturner = new InterestRateReturner(bandsCache);
                var interestCalculator   = new InterestCalculator(interestRateReturner);

                Assert.AreEqual(15.02m, interestCalculator.GetAmountOfInterest(1001));
            }
        }
Beispiel #2
0
 public void SetUp()
 {
     _bandsCacheMock       = new Mock <IBandsCache>();
     _interestRateReturner = new InterestRateReturner(_bandsCacheMock.Object);
 }