Exemplo n.º 1
0
        public void ReadsFileContentsIntoObject()
        {
            var project = GetProject("Simple");

            Assert.That(project.Guid, Is.EqualTo("{4A37C916-5AA3-4C12-B7A8-E5F878A5CDBA}"));
            Assert.That(project.AssemblyName, Is.EqualTo("MyProject"));
            Assert.That(project.Path,
                        Is.EqualTo(CsProjReader.GetRelativePath(_file.FullName, Environment.CurrentDirectory)));
            Assert.That(project.TargetFrameworkVersion, Is.EqualTo("v4.0"));
            Assert.That(project.ReferencedAssemblyNames, Is.EqualTo(new[]
            {
                "System",
                "System.Core",
                "System.Xml.Linq",
                "System.Data.DataSetExtensions",
                "Microsoft.CSharp",
                "System.Data",
                "System.Xml"
            }));
            Assert.That(project.ReferencedProjects, Is.EqualTo(new Dictionary <string, string>
            {
                { "MyApp.Core", "{99036BB6-4F97-4FCC-AF6C-0345A5089099}" },
                { "MyOtherProject", "{69036BB3-4F97-4F9C-AF2C-0349A5049060}" }
            }));
        }
Exemplo n.º 2
0
        private CsProj GetProject(string fileName)
        {
            file = SampleFiles.SampleFileHelper.GetCsProjFile(fileName);
            var reader = new CsProjReader();

            return(reader.Read(file));
        }
Exemplo n.º 3
0
        protected override void Execute(byte[] encodedFile)
        {
            var result = new CsProjReader().ReadDependencies(encodedFile);

            result.Count.Should().Be(2);
            result.Should().BeEquivalentTo("Antlr", "bootstrap");
        }
Exemplo n.º 4
0
 public void BeforeEach()
 {
     options    = new SlnGenerationOptions(WorkingDirectory);
     finder     = MockRepository.GenerateStrictMock <ProjectFileFinder>();
     reader     = MockRepository.GenerateStrictMock <CsProjReader>();
     repository = new CsProjRepository
     {
         Finder = finder,
         Reader = reader
     };
 }