예제 #1
0
파일: Program.cs 프로젝트: andrewchaa/Qoute
        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);
        }
예제 #2
0
 public void BeforeEachTest()
 {
     _offerRepository = new OfferRepository(@"..\..\..\market.csv");
     _service = new OfferService(_offerRepository);
 }