Ejemplo n.º 1
0
        public void ParseTest()
        {
            string[] testSourceFiles = new string[]
            {
                Path.Combine(Path.GetTempPath(), "ClassMembers.cs"),
                Path.Combine(Path.GetTempPath(), "ClassDefinition.cs"),
                Path.Combine(Path.GetTempPath(), "BlahBlahBlah.cs"),
                Path.Combine(Path.GetTempPath(), "Folder1\\Class2.cs"),
                Path.Combine(Path.GetTempPath(), "Folder1\\Folder2\\Class3.cs"),
                Path.Combine(Path.GetTempPath(), "Properties\\AssemblyInfo.cs"),
                Path.Combine(Path.GetTempPath(), "Test.Designer.cs")
            };

            MSBuildProjectParser projectParser = new MSBuildProjectParser();

            ReadOnlyCollection <string> sourceFiles = projectParser.Parse(_testProjectFile);

            Assert.AreEqual(testSourceFiles.Length, sourceFiles.Count, "Unexpected number of source files.");

            foreach (string testSourceFile in testSourceFiles)
            {
                Assert.IsTrue(
                    sourceFiles.Contains(testSourceFile),
                    "Test source file {0} was not included in the source file list.",
                    testSourceFile);
            }
        }
Ejemplo n.º 2
0
        public void ParseNullTest()
        {
            MSBuildProjectParser projectParser = new MSBuildProjectParser();

            Assert.Throws <ArgumentNullException>(
                delegate
            {
                projectParser.Parse(null);
            });
        }
Ejemplo n.º 3
0
        public void ParseNullTest()
        {
            MSBuildProjectParser projectParser = new MSBuildProjectParser();

            projectParser.Parse(null);
        }
        public void ParseNullTest()
        {
            MSBuildProjectParser projectParser = new MSBuildProjectParser();

            Assert.Throws(typeof(ArgumentNullException), () => projectParser.Parse(null));
        }