Package rewards

Examples of rewards.Dining


    jdbcTemplate = new SimpleJdbcTemplate(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


  @RequestMapping(value="/reward/new", method = RequestMethod.POST)
  public String create(@ModelAttribute("rewardForm") RewardForm rewardForm, BindingResult result) {
    if (result.hasErrors()) {
      return FORM_VIEW;
    } else {
      Dining dining = rewardForm.createDining();
      RewardConfirmation confirmation = rewardNetwork.rewardAccountFor(dining);
      return REDIRECT_SHOW_VIEW + "/" + confirmation.getConfirmationNumber();
    }
  }
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

  }

  @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

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.