Package rewards.internal

Source Code of rewards.internal.StubRewardRepository

package rewards.internal;

import java.util.Random;

import rewards.AccountContribution;
import rewards.Dining;
import rewards.RewardConfirmation;
import rewards.internal.reward.RewardRepository;

/**
* A dummy reward repository implementation.
*/
public class StubRewardRepository implements RewardRepository {

  public RewardConfirmation confirmReward(AccountContribution contribution, Dining dining) {
    return new RewardConfirmation(confirmationNumber(), contribution);
  }

  private String confirmationNumber() {
    return new Random().toString();
  }
}
TOP

Related Classes of rewards.internal.StubRewardRepository

TOP
Copyright © 2018 www.massapi.com. 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.