public WalletInterestCalculator() { CreditCardInterestCalculatorFactory factory = new CreditCardInterestCalculatorFactory(); _calculator = factory.GetInterestCalculator(); }
public void init() { _mockCreditCardInterestCalculator = MockRepository.GenerateStub <ICreditCardInterestCalculator>(); _calculator = new WalletInterestCalculator(_mockCreditCardInterestCalculator); _wallet = new Wallet(); }
public WalletInterestCalculator(ICreditCardInterestCalculator calculator) { _calculator = calculator; }
public void init() { _cardCalculator = new CreditCardInterestCalculatorFactory().GetInterestCalculator(); _walletCalculator = new WalletInterestCalculatorFactory().GetWalletInterestCalculator(); _personCalculator = new PersonInterestCalculatorFactory().GetPersonInterestCalculator(); }