public void GetsFilesFromFinderAndProcessesThemWithCsProjReader() { _finder.Expect(f => f.FindAllProjectFiles(WorkingDirectory)).Return(new List <FileInfo> { _file1, _file2 }); _reader.Expect(r => r.Read(_file1)).Return(_proj1); _reader.Expect(r => r.Read(_file2)).Return(_proj2); var projects = _repository.LookupCsProjsFromDirectory(_options); Assert.That(projects, Is.EqualTo(new[] { _proj1, _proj2 })); }
public void GetsFilesFromFinderAndProcessesThemWithCsProjReader() { finder.Expect(f => f.FindAllProjectFiles(StartPath)).Return(new List <FileInfo> { file1, file2 }); reader.Expect(r => r.Read(file1)).Return(proj1); reader.Expect(r => r.Read(file2)).Return(proj2); List <CsProj> projects = repository.LookupCsProjsFromDirectory(options); Assert.That(projects, Is.EqualTo(new[] { proj1, proj2 })); }
public void GetsFilesFromFinderAndProcessesThemWithCsProjReader() { if (options.ProjectTypes.Length > 0) { finder.SetProjectTypes(options.ProjectTypes); } finder.Expect(f => f.FindAllProjectFiles(WorkingDirectory)).Return(new List <FileInfo> { file1, file2 }); reader.Expect(r => r.Read(file1)).Return(proj1); reader.Expect(r => r.Read(file2)).Return(proj2); List <CsProj> projects = repository.LookupCsProjsFromDirectory(options); CollectionAssert.AreEqual(new[] { proj1, proj2 }, projects); }