public void TestInitialize() { target = new IterativeFibonacciCalculator(); }
public CalculatorController(IFibonacciCalculator calculator) { this.calculator = calculator; }
/// <summary> /// Initializes a new instance of the <see cref="FibonacciService"/> class. /// </summary> /// <param name="calculator">A <see cref="IFibonacciCalculator"/> object that /// calculates the nth element in the Fibonacci sequence.</param> public FibonacciService(IFibonacciCalculator calculator) { _calculator = calculator; }
public void TestInitialize() { target = new FastFibonacciCalculator(); }
public HomeController(IFibonacciCalculator fibonacciCalculator) { _fibonacciCalculator = fibonacciCalculator; }
public CalculatorController(IFibonacciCalculator calculator) { this.calculator = calculator; }
public static void CalculateAndWriteResults(IInputHandler inputHandler, IOutputHandler outputHandler, IFibonacciCalculator calculator) { var number = inputHandler.GetNumber(); var result = calculator.Calculate(number); outputHandler.Write(result); }
//constructor public ValuesController(IFibonacciCalculator fibonacciCalculator) { _fibonacciCalculator = fibonacciCalculator; }