Exemple #1
0
 public void ReadSimpleSolutionWithOneProject()
 {
     Solution solution = new Solution(@"..\..\..\Testing\Test1\ConsoleApplication.sln");
     Assert.AreEqual(solution.Items.Length, 1);
     Assert.AreEqual(solution.Items[0].Name, "ConsoleApplication");
     Assert.AreEqual(solution.Items[0].ProjectFile, "ConsoleApplication.csproj");
     Assert.AreEqual(solution.Items[0].ProjectType, new Guid("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"));
     Assert.AreEqual(solution.Items[0].Guid, new Guid("{6CDE022C-6A9C-4477-A065-A82E847C67CE}"));
 }
 public void ReadVersionsInSimpleSolutionWithOneProjectThaHasAssemblyVersionFileVersionButNoInformationalVersion()
 {
     StringReader reader = new StringReader(SimpleSolution);
     Solution solution = new Solution(reader, @"..\..\..\Testing\Test1");
     var solutionItems = solution.Items;
     Assert.AreEqual(1, solution.Items.Count());
     Assert.AreEqual(new AssemblyVersion("1.0.0.0"), solution.Items.ElementAt(0).Versions[VersionType.AssemblyVersion]);
     Assert.AreEqual(new FileVersion("1.0.0.0"), solution.Items.ElementAt(0).Versions[VersionType.FileVersion]);
     Assert.IsFalse(solution.Items.ElementAt(0).Versions.ContainsKey(VersionType.InformationalVersion));
 }
Exemple #3
0
 public void ReadProjectDataOfComplexSolutionWithThreeProjectsAndOneFolder()
 {
     StringReader reader = new StringReader(Test2Solution);
     Solution solution = new Solution(reader, @"..\..\..\Testing\Test2");
     Assert.AreEqual(solution.Items.Count(), 4);
     Assert.AreEqual(solution.Items.ElementAt(0).Name, "CSharpWindowsFormsApplication");
     Assert.AreEqual(solution.Items.ElementAt(1).Name, "VisualBasic");
     Assert.AreEqual(solution.Items.ElementAt(2).Name, "VBWindowsApplication");
     Assert.AreEqual(solution.Items.ElementAt(3).Name, "MFCApplication");
 }
Exemple #4
0
        public void ReadProjectDataInSimpleSolutionWithOneProject()
        {
            StringReader reader = new StringReader(SimpleSolution);
            Solution solution = new Solution(reader, @"..\..\..\Testing\Test1");

            Assert.AreEqual(solution.Items.Count(), 1);
            Assert.AreEqual(solution.Items.ElementAt(0).Name, "ConsoleApplication");
            Assert.AreEqual(solution.Items.ElementAt(0).ProjectFileName, "ConsoleApplication.csproj");
            Assert.AreEqual(solution.Items.ElementAt(0).ProjectType, new Guid("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"));
            Assert.AreEqual(solution.Items.ElementAt(0).ItemGuid, new Guid("{6CDE022C-6A9C-4477-A065-A82E847C67CE}"));
        }
Exemple #5
0
 public void ReadContentOfSimpleSolutionFileWithOneProject()
 {
     StringReader reader = new StringReader(SimpleSolution);
     Solution solution = new Solution(reader, @"..\..\..\Testing\Test1");
     Assert.AreEqual(solution.Items.Count(), 1);
 }
Exemple #6
0
 public void ReadContentOfComplexSolutionFileWithThreeProjectsAndOneFolder()
 {
     StringReader reader = new StringReader(Test2Solution);
     Solution solution = new Solution(reader, @"..\..\..\Testing\Test2");
     Assert.AreEqual(solution.Items.Count(), 4);
 }