Merge pull request #2370 from DavidKarlas/replaceQuote
[mono.git] / mcs / class / Microsoft.Build.Engine / Test / various / ProjectElement.cs
index 7e52c74f52facb9ca3ac341b258de019f362e598..7f675a1d5f821315300f8ffe5c9f29575a3a66ff 100644 (file)
@@ -66,5 +66,21 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
                        cproj = CloneProject (proj);
                        Assert.AreEqual (proj.DefaultTargets, cproj.DefaultTargets, "A4");
                }
+
+               [Test]
+               [ExpectedException (typeof (InvalidProjectFileException))]
+               public void TestRootElement ()
+               {
+                       Engine engine;
+                       Project proj;
+                       string documentString = @"
+                       <something>
+                       </something>
+                       ";
+
+                       engine = new Engine (Consts.BinPath);
+                       proj = engine.CreateNewProject ();
+                       proj.LoadXml (documentString);
+               }
        }
 }