public void CopyAmountFromConfirmation_WhenConfirmationHasIncorrectFormat_ThenThrowsApplicationException()
        {
            var euroPolicy      = new EuroPolicy();
            var rewriterService = new RewriterService(StubConfirmation.IncorrectFormat());

            Assert.Throws <ApplicationException>(() => rewriterService.CopyAmountFromConfirmation(euroPolicy));
        }
示例#2
0
        public void CopyPassengersFromConfirmation_WhenConfirmationHasCorrectFormat_ThenReturnsCorrectValue()
        {
            var rewriterService = new RewriterService(StubConfirmation.PLNVersion());

            var actualPassengers = rewriterService.CopyPassengersFromConfirmation();

            Assert.AreEqual(expectedPassengers, actualPassengers);
        }
        public void CopyInvocieNumberFromConfirmation_WhenConfirmationHasCorrectFormat_ThenReturnsCorrectValue()
        {
            var rewriterService = new RewriterService(StubConfirmation.PLNVersion());

            var actualTravelNumber = rewriterService.CopyInvocieNumberFromConfirmation();

            Assert.AreEqual("053683790Z", actualTravelNumber);
        }
        public void CopyBookingIdFromConfirmation_WhenConfirmationHasCorrectFormat_ThenReturnsCorrectValue()
        {
            var rewriterService = new RewriterService(StubConfirmation.PLNVersion());

            var actualTravelNumber = rewriterService.CopyBookingIdFromConfirmation();

            Assert.AreEqual("U576YR", actualTravelNumber);
        }
        public void CopyAmountFromConfirmation_WhenConfirmationContainAmountInPlnFormat_ThenReturnsCorrectValue()
        {
            var plnPolicy       = new PlnPolicy();
            var rewriterService = new RewriterService(StubConfirmation.PLNVersion());

            var actualAmount = rewriterService.CopyAmountFromConfirmation(plnPolicy);

            Assert.AreEqual(expected: 161.96m, actualAmount.Value);
        }
        public void CopyAmountFromConfirmation_WhenConfirmationContainAmountInEuroFormat_ThenReturnsCorrectValue()
        {
            var euroPolicy      = new EuroPolicy();
            var rewriterService = new RewriterService(StubConfirmation.EURVersion());

            Console.WriteLine(StubConfirmation.EURVersion().Content);

            var actualAmount = rewriterService.CopyAmountFromConfirmation(euroPolicy);

            Assert.AreEqual(expected: 161.96m, actualAmount.Value);
        }
示例#7
0
        public void CopyPassengersFromConfirmation_WhenConfirmationHasIncorrectFormat_ThenThrowsApplicationException()
        {
            var rewriterService = new RewriterService(StubConfirmation.IncorrectFormat());

            Assert.Throws <ApplicationException>(() => rewriterService.CopyPassengersFromConfirmation());
        }
        public void CopyInvocieNumberFromConfirmation_WhenConfirmationHasIncorrectFormat_ThenThrowsApplicationException()
        {
            var rewriterService = new RewriterService(StubConfirmation.IncorrectFormat());

            Assert.Throws <ApplicationException>(() => rewriterService.CopyBookingIdFromConfirmation());
        }