Package rewards

Examples of rewards.Dining


  }

  @Test
  public void testRewardForDining() {
    // create a new dining of 100.00 charged to credit card '1234123412341234' by merchant '123457890' as test input
    Dining dining = Dining.createDining("100.00", "1234123412341234", "1234567890");

    // call the 'rewardNetwork' to test its rewardAccountFor(Dining) method
    RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);

    // assert the expected reward confirmation results
View Full Code Here


    repository = new JdbcRewardRepository(dataSource);
  }

  @Test
  public void testCreateReward() throws SQLException {
    Dining dining = Dining.createDining("100.00", "1234123412341234", "0123456789");

    Account account = new Account("1", "Keith and Keri Donald");
    account.setEntityId(0L);
    account.addBeneficiary("Annabelle", Percentage.valueOf("50%"));
    account.addBeneficiary("Corgan", Percentage.valueOf("50%"));
View Full Code Here

  @Autowired
  private RewardNetwork rewardNetwork;

  @Test
  public void testHessianClient() {
    Dining dining = Dining.createDining("100.00", "1234123412341234", "1234567890");

    // Hessian client proxy
    RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);

    // assert the expected reward confirmation results
View Full Code Here

  @Autowired
  private RewardNetwork rewardNetwork;
 
  @Test
  public void testHttpInvokerClient() {
    Dining dining = Dining.createDining("100.00", "1234123412341234", "1234567890");

    // HttpInvoker client proxy
    RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);

    // assert the expected reward confirmation results
View Full Code Here

  @Test
  public void testRewardForDining() {
    // create a new dining of 100.00 charged to credit card
    // '1234123412341234' by merchant '123457890' as test input
    Dining dining = Dining.createDining("100.00", "1234123412341234",
        "1234567890");

    // TODO: replace 'null' below with a call to the 'rewardNetwork' to test
    // its rewardAccountFor(Dining) method
    RewardConfirmation confirmation = null;
View Full Code Here

  }

  @Test
  public void testRewardForDining() {
    // create a new dining of 100.00 charged to credit card '1234123412341234' by merchant '123457890' as test input
    Dining dining = Dining.createDining("100.00", "1234123412341234", "1234567890");

    // call the 'rewardNetwork' to test its rewardAccountFor(Dining) method
    RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);

    // assert the expected reward confirmation results
View Full Code Here

  }

  @Override
  protected Element invokeInternal(Element requestElement, Document document) throws Exception {
    Element diningElement = DomUtils.getChildElementByTagName(requestElement, "dining");
    Dining dining = mapDining(diningElement);
    RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);
    Element responseElement = document.createElementNS(NAMESPACE_URI, "rewardAccountForDiningResponse");
    responseElement.appendChild(mapRewardConfirmation(document, confirmation));
    return responseElement;
  }
View Full Code Here

  private Dining mapDining(Element diningElement) {
    String amount = diningElement.getAttribute("amount");
    String creditCardNumber = diningElement.getAttribute("creditCardNumber");
    String merchantNumber = diningElement.getAttribute("merchantNumber");
    Dining dining = Dining.createDining(amount, creditCardNumber, merchantNumber);
    return dining;
  }
View Full Code Here

  private SoapRewardNetwork rewardNetwork;

  @Test
  public void testRewardForDining() {
    // create a new dining of 100.00 charged to credit card '1234123412341234' by merchant '123457890' as test input
    Dining dining = Dining.createDining("100.00", "1234123412341234", "1234567890");

    // call the 'rewardNetwork' to test its rewardAccountFor(Dining) method
    RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);

    // assert the expected reward confirmation results
View Full Code Here

    repository = new JdbcRewardRepository(dataSource);
  }

  @Test
  public void testCreateReward() throws SQLException {
    Dining dining = Dining.createDining("100.00", "1234123412341234", "0123456789");

    Account account = new Account("1", "Keith and Keri Donald");
    account.setEntityId(0L);
    account.addBeneficiary("Annabelle", Percentage.valueOf("50%"));
    account.addBeneficiary("Corgan", Percentage.valueOf("50%"));
View Full Code Here

TOP

Related Classes of rewards.Dining

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.