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); } }
public void ParseNullTest() { MSBuildProjectParser projectParser = new MSBuildProjectParser(); projectParser.Parse(null); }