Exemple #1
0
        static void Main(string[] args)
        {
            if (ValidateArguments(args)) return;

            double requestedAmount = double.Parse(args[1]);
            string filePath = args[0];

            if (ValidateRequestedAmount(requestedAmount)) return;

            var service = new OfferService(new OfferRepository(filePath));
            var offer = service.FindMinimumRateFor(requestedAmount);

            if (ValidateOffer(requestedAmount, offer)) return;

            DisplayOfferDetails(offer);
        }
Exemple #2
0
 public void BeforeEachTest()
 {
     _offerRepository = new OfferRepository(@"..\..\..\market.csv");
     _service = new OfferService(_offerRepository);
 }