public void When_Reading_The_List()
        {
            string pathToFile = "data.txt";

            IDataFileReader reader = MockRepository.GenerateStub<IDataFileReader>();
            _stringsToReturn = new List<string>() { "First,Person", "Second,Person" };
            reader.Stub(r => r.ReadFile(pathToFile)).Return(_stringsToReturn);

            var listBuilder = new CandidateListBuilder(reader, new CommaDelimitedDataToNameConverter());

            _candidates = listBuilder.Build(pathToFile);
        }
Exemple #2
0
 public Watson(CandidateListBuilder candidateListBuilder, ICanTalk speaker)
 {
     InitializeComponent();
     _candidateListBuilder = candidateListBuilder;
     _speaker = speaker;
 }