Ejemplo n.º 1
0
        public void FindsOneProjectInFolderWithCsproj()
        {
            finder.SetProjectTypes(new[] { ProjectFileType.CSPROJ });
            projectFiles = finder.FindAllProjectFiles(Path.Combine(SampleFileSystemPath, @"MyProject"));

            AssertFilesMatching(new[]
            {
                @"MyProject\MyProject.csproj"
            });
        }
Ejemplo n.º 2
0
        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);

            Assert.That(projects, Is.EqualTo(new[] { proj1, proj2 }));
        }