public void ShouldReturnParcelZoneWhenValidDestination1()
        {
            // Arrange
            ParcelQuoteFromNelson zoneCalculator = new ParcelQuoteFromNelson();
            // Act
            var zone = zoneCalculator.GetDestinationZone("Kaikoura");

            // Assert
            Assert.AreEqual("Orange", zone);
        }
        public void ReturnDestinationZoneColour_WhenDestinationIsWaihopaiValley()
        {
            // Arrange
            ParcelQuoteFromNelson pqfn = new ParcelQuoteFromNelson();
            // Act
            string ActualZone = pqfn.GetDestinationZone("Waihopai Valley");

            // Assert
            Assert.AreEqual("Blue", ActualZone);
        }
Esempio n. 3
0
        public void CompareColourWaihopaiValleyTicket()
        {
            //arrange
            ParcelQuoteFromNelson quoteWaihopaiValley = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteWaihopaiValley.GetDestinationZone("Waihopai Valley"); //town name

            //assert
            Assert.AreEqual("Blue", ticketColour); //ticket colour
        }
        public void ReturnDestinationZoneColour_WhenDestinationIsMotueka()
        {
            // Arrange
            ParcelQuoteFromNelson pqfn = new ParcelQuoteFromNelson();
            // Act
            string ActualZone = pqfn.GetDestinationZone("Motueka");

            // Assert
            Assert.AreEqual("Pink", ActualZone);
        }
        public void ShouldReturnOrangeWhenDestinationValid2()
        {
            // Arrange
            ParcelQuoteFromNelson zoneCalculator = new ParcelQuoteFromNelson();
            // Act
            var zone = zoneCalculator.GetDestinationZone("Reefton");

            // Assert
            Assert.AreEqual("Orange", zone);
        }
Esempio n. 6
0
        public void CompareColourNelsonLakesTicket()
        {
            //arrange
            ParcelQuoteFromNelson quoteNelsonLakes = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteNelsonLakes.GetDestinationZone("Nelson Lakes National Park"); //town name

            //assert
            Assert.AreEqual("Lime", ticketColour); //ticket colour
        }
Esempio n. 7
0
        public void CompareColourHanmerSpringsTicket()
        {
            //arrange
            ParcelQuoteFromNelson quoteHanmerSprings = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteHanmerSprings.GetDestinationZone("Hanmer Springs"); //town name

            //assert
            Assert.AreEqual("Orange", ticketColour); //ticket colour
        }
Esempio n. 8
0
        public void CompareColourMurchisonTicket()
        {
            //arrange
            ParcelQuoteFromNelson quoteMurchison = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteMurchison.GetDestinationZone("Murchison"); //town name

            //assert
            Assert.AreEqual("Lime", ticketColour); //ticket colour
        }
Esempio n. 9
0
        public void CompareColourTakakaTicket()
        {
            //arrange
            ParcelQuoteFromNelson quoteTakaka = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteTakaka.GetDestinationZone("Takaka"); //town name

            //assert
            Assert.AreEqual("Blue", ticketColour); //ticket colour
        }
        public void ReturnDestinationZoneColour_WhenDestinationIsHanmerSprings()
        {
            // Arrange
            ParcelQuoteFromNelson pqfn = new ParcelQuoteFromNelson();
            // Act
            string ActualZone = pqfn.GetDestinationZone("Hanmer Springs");

            // Assert
            Assert.AreEqual("Orange", ActualZone);
        }
Esempio n. 11
0
        public void CompareColourHopeTicket()
        {
            //arrange
            ParcelQuoteFromNelson quoteHope = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteHope.GetDestinationZone("Hope"); //town name

            //assert
            Assert.AreEqual("Pink", ticketColour); //ticket colour
        }
        public void pReturnStandardPrice_WhenDestinationWithinPinkZone2()
        {
            // Arrange.
            ParcelQuoteFromNelson parcelQuote = new ParcelQuoteFromNelson();
            // Act.

            string zone = parcelQuote.GetDestinationZone("blenheim");

            // Assert.
            Assert.AreEqual("pink", zone, true);
        }
Esempio n. 13
0
        public void lReturnBugPrice_WhenDestinationWithinLimeZone()
        {
            // Arrange.
            ParcelQuoteFromNelson parcelQuote = new ParcelQuoteFromNelson();
            // Act.

            string zone = parcelQuote.GetDestinationZone("Murchison");

            // Assert.
            Assert.AreEqual("lime", zone, true);
        }
        public void ReturnZoneColour_Orange()
        {
            //Arrange
            ParcelQuoteFromNelson lcQuoteFromNelson = new ParcelQuoteFromNelson();

            //Act
            string lcTicketColour = lcQuoteFromNelson.GetDestinationZone("Kaikoura"); //town name

            //Assert
            Assert.AreEqual("Orange", lcTicketColour); //ticket colour
        }
        public void ReturnZoneColour_Lime()
        {
            //Arrange
            ParcelQuoteFromNelson lcQuoteFromNelson = new ParcelQuoteFromNelson();

            //Act
            string lcTicketColour = lcQuoteFromNelson.GetDestinationZone("Nelson Lakes National Park"); //town name

            //Assert
            Assert.AreEqual("Lime", lcTicketColour); //ticket colour
        }
Esempio n. 16
0
        public void oReturnStandardPrice_WhenDestinationWithinOrangeZone()
        {
            // Arrange.
            ParcelQuoteFromNelson parcelQuote = new ParcelQuoteFromNelson();
            // Act.

            string zone = parcelQuote.GetDestinationZone("hamner springs");

            // Assert.
            Assert.AreEqual("orange", zone, true);
        }
        public void ReturnBlueZone_WhenTakakaIsSelected()
        {
            // Arrange
            ParcelQuoteFromNelson fastwayCourier = new ParcelQuoteFromNelson();

            // Act
            string blueZoneDestination = fastwayCourier.GetDestinationZone("Takaka");

            // Assert
            Assert.AreEqual("Blue", blueZoneDestination);
        }
        public void ReturnPinkZone_WhenHopeIsSelected()
        {
            // Arrange
            ParcelQuoteFromNelson fastwayCourier = new ParcelQuoteFromNelson();

            // Act
            string pinkZoneDestination = fastwayCourier.GetDestinationZone("Hope");

            // Assert
            Assert.AreEqual("Pink", pinkZoneDestination);
        }
        public void ReturnOrangeZone_WhenReeftonIsSelected()
        {
            // Arrange
            ParcelQuoteFromNelson fastwayCourier = new ParcelQuoteFromNelson();

            // Act
            string orangeZoneDestination = fastwayCourier.GetDestinationZone("Reefton");

            // Assert
            Assert.AreEqual("Orange", orangeZoneDestination);
        }
        public void ReturnLimeZone_WhenMurchisonIsSelected()
        {
            // Arrange
            ParcelQuoteFromNelson fastwayCourier = new ParcelQuoteFromNelson();

            // Act
            string limeZoneDestination = fastwayCourier.GetDestinationZone("Murchison");

            // Assert
            Assert.AreEqual("Lime", limeZoneDestination);
        }
        public void bReturnBugPrice_WhenDestinationWithinBlueZone2()
        {
            // Arrange.
            ParcelQuoteFromNelson parcelQuote = new ParcelQuoteFromNelson();
            // Act.

            string zone = parcelQuote.GetDestinationZone("riwaka");

            // Assert.
            Assert.AreEqual("blue", zone, true);
        }
        public void ReturnOrange_WhenDestinationIsKaikoura()
        {
            //arrange
            var PQ          = new ParcelQuoteFromNelson();
            var Destination = "Kaikoura";

            //act
            var zone = PQ.GetDestinationZone(Destination);

            //assert
            Assert.AreEqual("Orange", zone);
        }
Esempio n. 23
0
        public void CompareColourAllTicket()
        {
            ParcelQuoteFromNelson quoteFromNelson = new ParcelQuoteFromNelson();

            string[] pinkZones = new string[] { "Nelson", "Motueka", "Mapua", "Atawhai", "Matai", "Hope", "Brightwater", "Wakefield", "Renwick", "Picton", "Blenheim" };

            foreach (string towns in pinkZones)
            {
                string ticketColour = quoteFromNelson.GetDestinationZone(towns);
                Assert.AreEqual("Pink", ticketColour);
            }
        }
        public void ReturnBlue_WhenDestinationIsTakaka()
        {
            //arrange
            var PQ          = new ParcelQuoteFromNelson();
            var Destination = "Takaka";

            //act
            var zone = PQ.GetDestinationZone(Destination);

            //assert
            Assert.AreEqual("Blue", zone);
        }
        public void ReturnLime_WhenDestinationIsCollingwood()
        {
            //arrange
            var PQ          = new ParcelQuoteFromNelson();
            var Destination = "Collingwood";

            //act
            var zone = PQ.GetDestinationZone(Destination);

            //assert
            Assert.AreEqual("Lime", zone);
        }
        public void ReturnLime_WhenDestinationIsNelsonLakes()
        {
            //arrange
            var PQ          = new ParcelQuoteFromNelson();
            var Destination = "Nelson Lakes National Park";

            //act
            var zone = PQ.GetDestinationZone(Destination);

            //assert
            Assert.AreEqual("Lime", zone);
        }
        public void ReturnPink_WhenDestinationIsMotueka()
        {
            //arrange
            var PQ          = new ParcelQuoteFromNelson();
            var Destination = "Motueka";

            //act
            var zone = PQ.GetDestinationZone(Destination);

            //assert
            Assert.AreEqual("Pink", zone);
        }
        public void ReturnKeyException_WhenDestinationIsAuckland()
        {
            //arrange
            var PQ          = new ParcelQuoteFromNelson();
            var Destination = "Auckland";

            //act
            var zone = PQ.GetDestinationZone(Destination);

            //assert
            Assert.AreEqual("KeyNotFoundException", zone);
        }
        public void TestMethod1()
        {
            string[] pinkZone = new string[11] {
                "Nelson", "Motueka", "Mapua", "Atawhai", "Matai", "Hope", "Brightwater", "Wakefield", "Renwick", "Picton", "Blenheim"
            };

            //arrange
            ParcelQuoteFromNelson quoteNelson = new ParcelQuoteFromNelson();
            //act
            string ticketColour = quoteNelson.GetDestinationZone("Nelson"); //town name

            //assert
            Assert.AreEqual("Pink", ticketColour); //ticket colour
        }
        public void Fail_WhenParcelWeightIsOutsideMaximumLegalUpperBoundaries()
        {
            // Arrange
            ParcelQuoteFromNelson fastwayCourier = new ParcelQuoteFromNelson();

            // Act
            decimal           nonLegalMaxUpperBoundWeight = 26.1m;
            decimal           parcelPrice     = 19.15m;
            string            zoneDestination = fastwayCourier.GetDestinationZone("Reefton");
            ParcelQuoteResult parcelQuote     = fastwayCourier.CalculateQuote(nonLegalMaxUpperBoundWeight, zoneDestination);

            // Assert
            Assert.AreEqual(parcelPrice, parcelQuote.Price);
        }