Exemple #1
0
        public WalletInterestCalculator()
        {
            CreditCardInterestCalculatorFactory factory = new CreditCardInterestCalculatorFactory();

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