/// <summary> /// Constructor to assign private variables /// </summary> public CommunicationProcessorTests() { _fileReader = new MockFileReader(); _romanToIntConverter = new RomanToIntConverter(); _inputParser = new InputParser(_romanToIntConverter); _answerGenerator = new AnswerGenerator(_romanToIntConverter); _communicationProcessor = new CommunicationProcessor(_fileReader, _inputParser, _answerGenerator); }
/// <summary> /// Method to initialize the private variables. /// </summary> /// <param name="filePath">Source File Path.</param> private static void GeneratePreRecs(string filePath) { _fileReader = new FileReader(filePath); _romanToIntConverter = new RomanToIntConverter(); _inputParser = new InputParser(_romanToIntConverter); _answerGenerator = new AnswerGenerator(_romanToIntConverter); _communicationProcessor = new CommunicationProcessor(_fileReader, _inputParser, _answerGenerator); }
/// <summary> /// Constructor to initialize the private variables. /// </summary> /// <param name="fileReader">File Reader.</param> /// <param name="inputParser">Input Parser.</param> /// <param name="answerGenerator">Answer Generator.</param> public CommunicationProcessor(IFileReader fileReader, IInputParser inputParser, IAnswerGenerator answerGenerator) { if (fileReader == null) { throw new ArgumentNullException("fileReader"); } if (inputParser == null) { throw new ArgumentNullException("inputParser"); } if (answerGenerator == null) { throw new ArgumentNullException("answerGenerator"); } _fileReader = fileReader; _inputParser = inputParser; _answerGenerator = answerGenerator; }
public LunchController(IAnswerGenerator gen) { generator = gen; }
public AliceController(IAnswerGenerator gen) { generator = gen; }
public LotController(IAnswerGenerator answer) { aGen = answer; }
/// <summary> /// To assign private readonly property /// </summary> public AnswerGeneratorTests() { _romanToIntConverter = new RomanToIntConverter(); _answerGenerator = new AnswerGenerator(_romanToIntConverter); }