Ejemplo n.º 1
0
        static void Main()
        {
            Welcome.welcomePrintout();

            Console.WriteLine("Would you like to place an order? Y/N");
            string orderResponse = Console.ReadLine();

            if (orderResponse == "yes" || orderResponse == "Y" || orderResponse == "y")
            {
                Console.WriteLine(">>>>> How many loaves of bread would you like to purchase?");
                string    breadResponse = Console.ReadLine();
                int       breadCount    = Int32.Parse(breadResponse);
                BreadItem newBreadItem  = new BreadItem(breadCount);
                Console.WriteLine(">>>>> Bread Loaves: " + breadResponse);

                Console.WriteLine(">>>>> How many pastries would you like to purchase?");
                string     pastryResponse = Console.ReadLine();
                int        pastryCount    = Int32.Parse(pastryResponse);
                PastryItem newPastryItem  = new PastryItem(pastryCount);
                Console.WriteLine(">>>>> Pastries: " + pastryResponse);

                newBreadItem.ReceiptPrintoutBread(breadCount);
                newPastryItem.ReceiptPrintoutPastry(pastryCount);
                Salutation.salutationPrintout();
            }
            else
            {
                Console.WriteLine("Please Come Again!");
            }
        }
Ejemplo n.º 2
0
        public void PastryTotalCount_CalculateCountOfAllPastries_PastryTotalCount()
        {
            PastryItem newPastryItem = new PastryItem(14);

            Assert.AreEqual(14, newPastryItem.PastryTotalCount(14));
        }
Ejemplo n.º 3
0
        public void PastryCustomerCost_CalculateTotalCostOfPastries_PastryCustomerCost()
        {
            PastryItem newPastryItem = new PastryItem(17);

            Assert.AreEqual(29, newPastryItem.PastryCustomerCost(2, 5));
        }
Ejemplo n.º 4
0
        public void PastrySinglesCost_CalculateCostOfPastrySingles_PastrySinglesCostCalc()
        {
            PastryItem newPastryItem = new PastryItem(11);

            Assert.AreEqual(4, newPastryItem.PastrySinglesCostCalc(11));
        }
Ejemplo n.º 5
0
        public void PastryBundleCost_CalculateCostOfPastryBundles_PastryBundleCostCalc()
        {
            PastryItem newPastryItem = new PastryItem(11);

            Assert.AreEqual(15, newPastryItem.PastryBundleCostCalc(11));
        }
Ejemplo n.º 6
0
        public void PastrySingles_CalculateNumberOfSinglePastriesOwed_PastrySinglesCalc()
        {
            PastryItem newPastryItem = new PastryItem(11);

            Assert.AreEqual(2, newPastryItem.PastrySinglesCalc(11));
        }
Ejemplo n.º 7
0
        public void PastryBundle_CalculateNumberOfPastryBundles_PastryBundleCalc()
        {
            PastryItem newPastryItem = new PastryItem(11);

            Assert.AreEqual(3, newPastryItem.PastryBundleCalc(11));
        }