Package org.example.price

Examples of org.example.price.PriceRequest


        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here


        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here

        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here

        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here

        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here

        shipAddress.setState("nj");
        shipAddress.setZip("07960");
        priceQuote.setShipAddress(shipAddress);

        PriceRequests priceRequests = PriceFactory.INSTANCE.createPriceRequests();
        PriceRequest priceRequest = PriceFactory.INSTANCE.createPriceRequest();
        priceRequest.setWidgetId(BigInteger.valueOf(12));
        priceRequest.setPrice(1.00f);
        priceRequests.getPriceRequest().add(priceRequest);

        priceRequest = PriceFactory.INSTANCE.createPriceRequest();
        priceRequest.setWidgetId(BigInteger.valueOf(134));
        priceRequest.setPrice(34.10f);
        priceRequests.getPriceRequest().add(priceRequest);

        priceRequest = PriceFactory.INSTANCE.createPriceRequest();
        priceRequest.setWidgetId(BigInteger.valueOf(211));
        priceRequest.setPrice(10.00f);
        priceRequests.getPriceRequest().add(priceRequest);

        priceQuote.setPriceRequests(priceRequests);

        return priceQuote;
View Full Code Here

        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here

        TestCase.assertEquals(availRequests.size(), priceRequests.size());
        TestCase.assertEquals(availRequests.size(), quoteResponses.size());
   
        for (int i = 0; i < availRequests.size(); i++) {
            AvailRequest availRequest = (AvailRequest)availRequests.get(i);
            PriceRequest priceRequest = (PriceRequest)priceRequests.get(i);
            QuoteResponse quoteResponse = (QuoteResponse)quoteResponses.get(i);
            TestCase.assertEquals(availRequest.getWidgetId(), quoteResponse.getWidgetId());
            TestCase.assertEquals(priceRequest.getPrice(), quoteResponse.getUnitPrice());
            TestCase.assertEquals(availRequest.getRequestedQuantity(), quoteResponse.getRequestedQuantity());
            TestCase.assertEquals(availRequest.isQuantityAvail(), quoteResponse.isFillOrder());
            if (availRequest.getShipDate() == null) {
                TestCase.assertNull(quoteResponse.getShipDate());
            } else {
                TestCase.assertEquals(availRequest.getShipDate(), quoteResponse.getShipDate());
            }
            TestCase.assertEquals(taxRate, quoteResponse.getTaxRate());
            TestCase.assertEquals(quoteCalculatorImpl.calculateTotalPrice(taxRate,
                                                                          availRequest.getRequestedQuantity(),
                                                                          priceRequest.getPrice(),
                                                                          availRequest.isQuantityAvail()),
                                                                          quoteResponse.getTotalCost());
        }
    }
View Full Code Here

TOP

Related Classes of org.example.price.PriceRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.