2006-12-04 Marek Sieradzki <marek.sieradzki@gmail.com>
authorMarek Sieradzki <msierad@mono-cvs.ximian.com>
Mon, 4 Dec 2006 16:21:59 +0000 (16:21 -0000)
committerMarek Sieradzki <msierad@mono-cvs.ximian.com>
Mon, 4 Dec 2006 16:21:59 +0000 (16:21 -0000)
        * EvaluationOrder.cs, Condition.cs: Added.

svn path=/trunk/mcs/; revision=68962

mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine_test.dll.sources
mcs/class/Microsoft.Build.Engine/Test/resources/Import.csproj [new file with mode: 0644]
mcs/class/Microsoft.Build.Engine/Test/resources/SelfImport.csproj [new file with mode: 0644]
mcs/class/Microsoft.Build.Engine/Test/resources/TestTasks.cs
mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs [new file with mode: 0644]
mcs/class/Microsoft.Build.Engine/Test/various/EvaluationOrder.cs [new file with mode: 0644]

index 8c8d35613fda58160e467667ce6db1ac6fa0c516..be5ff651549b858fa650fb7c68d2d80b4006b426 100644 (file)
@@ -17,7 +17,9 @@ Microsoft.Build.BuildEngine/TargetTest.cs
 Microsoft.Build.BuildEngine/UsingTaskTest.cs
 Microsoft.Build.BuildEngine/UsingTaskCollectionTest.cs
 Microsoft.Build.BuildEngine/UtilitiesTest.cs
+various/Conditions.cs
 various/DefaultTasks.cs
+various/EvaluationOrder.cs
 various/Items.cs
 various/ProjectElement.cs
 various/Properties.cs
diff --git a/mcs/class/Microsoft.Build.Engine/Test/resources/Import.csproj b/mcs/class/Microsoft.Build.Engine/Test/resources/Import.csproj
new file mode 100644 (file)
index 0000000..83c167c
--- /dev/null
@@ -0,0 +1,5 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+       <PropertyGroup>
+               <ImportedProperty>Value</ImportedProperty>
+       </PropertyGroup>
+</Project>
diff --git a/mcs/class/Microsoft.Build.Engine/Test/resources/SelfImport.csproj b/mcs/class/Microsoft.Build.Engine/Test/resources/SelfImport.csproj
new file mode 100644 (file)
index 0000000..88310d9
--- /dev/null
@@ -0,0 +1,3 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+       <Import Project="SelfImport.csproj"/>
+</Project>
index 0f0fca5cf7203d0106461a46793e18e70b47d1dd..dbcff81acbc4a6bf2cbe76ca79ed336c7c6921ef 100644 (file)
 using Microsoft.Build.Framework;
 using Microsoft.Build.Utilities;
 
-public class SimpleTask : Task {
+public class OutputTestTask : Task {
        public override bool Execute ()
        {
                return true;
        }
+
+       [Output]
+       public string Property {
+               get { return "some_text"; }
+       }
 }
 
-public class OutputTestTast : Task {
+public class RequiredTestTask : Task {
        public override bool Execute ()
        {
                return true;
        }
 
-       [Output]
+       string property;
+
+       [Required]
        public string Property {
-               get { return "some_text"; }
+               set { property = value; }
+       }
+}
+
+
+public class TrueTestTask : Task {
+       public override bool Execute ()
+       {
+               return true;
+       }
+}
+
+public class FalseTestTask : Task {
+       public override bool Execute ()
+       {
+               return false;
        }
 }
index 736472d5b3fc3c128711812dd399f9821764d4e7..5cc10cb3dcf77563020f20da6f01b82d23313d10 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-04  Marek Sieradzki  <marek.sieradzki@gmail.com>
+
+       * EvaluationOrder.cs, Condition.cs: Added.
+
 2006-12-04  Marek Sieradzki  <marek.sieradzki@gmail.com>
 
        * Items.cs: Split big test into 4.
diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
new file mode 100644 (file)
index 0000000..c3d0bc0
--- /dev/null
@@ -0,0 +1,198 @@
+//
+// Conditions.cs: Tests various conditions by checking if a property
+// is added to EvaluatedProperties.
+//
+// Author:
+//   Marek Sieradzki (marek.sieradzki@gmail.com)
+//
+// (C) 2006 Marek Sieradzki
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Xml;
+using Microsoft.Build.BuildEngine;
+using NUnit.Framework;
+
+namespace MonoTests.Microsoft.Build.BuildEngine.Various {
+       [TestFixture]
+       public class Conditions {
+
+               [Test]
+               public void TestCondition1 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <A Condition='true'></A>
+                                               <B Condition='false'></B>
+                                               <C Condition='TRUE'></C>
+                                               <D Condition='FALSE'></D>
+                                               <E Condition=''>A</E>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.IsNotNull (proj.EvaluatedProperties ["A"], "A1");
+                       Assert.IsNull (proj.EvaluatedProperties ["B"], "A2");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["C"], "A3");
+                       Assert.IsNull (proj.EvaluatedProperties ["D"], "A4");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["E"], "A5");
+               }
+
+               [Test]
+               public void TestCondition2 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <A Condition='true or true'></A>
+                                               <B Condition='false or false'></B>
+                                               <C Condition='true or false'></C>
+                                               <D Condition='false or true'></D>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.IsNotNull (proj.EvaluatedProperties ["A"], "A1");
+                       Assert.IsNull (proj.EvaluatedProperties ["B"], "A2");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["C"], "A3");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["D"], "A4");
+               }
+
+               [Test]
+               public void TestCondition3 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <A Condition='true and true'></A>
+                                               <B Condition='false and false'></B>
+                                               <C Condition='true and false'></C>
+                                               <D Condition='false and true'></D>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.IsNotNull (proj.EvaluatedProperties ["A"], "A1");
+                       Assert.IsNull (proj.EvaluatedProperties ["B"], "A2");
+                       Assert.IsNull (proj.EvaluatedProperties ["C"], "A3");
+                       Assert.IsNull (proj.EvaluatedProperties ["D"], "A4");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestCondition4 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <A Condition='!true'></A>
+                                               <B Condition='!false'></B>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.IsNull (proj.EvaluatedProperties ["A"], "A1");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["B"], "A2");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestCondition5 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <a Condition='-1 &lt; 0'></a>
+                                               <b Condition='-1 &lt;= 0'></b>
+                                               <c Condition='-1.0 &lt; 0.0'></c>
+                                               <d Condition='-1.0 &lt;= 0.0'></d>
+                                               <e Condition='-1.0 == 0.0'></e>
+                                               <f Condition='0.0 == 0.0'></f>
+                                               <g Condition='-1.0 != 0.0'></g>
+                                               <h Condition='0.0 != 0.0'></h>
+                                               <i Condition='1 &gt; 0'></i>
+                                               <j Condition='1 &gt;= 0'></j>
+                                               <k Condition='-1 &gt; 0'></k>
+                                               <l Condition='-1 &gt;= 0'></l>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.IsNotNull (proj.EvaluatedProperties ["a"], "A1");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["b"], "A2");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["c"], "A3");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["d"], "A4");
+                       Assert.IsNull (proj.EvaluatedProperties ["e"], "A5");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["f"], "A6");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["g"], "A7");
+                       Assert.IsNull (proj.EvaluatedProperties ["h"], "A8");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["i"], "A1");
+                       Assert.IsNotNull (proj.EvaluatedProperties ["j"], "A2");
+                       Assert.IsNull (proj.EvaluatedProperties ["k"], "A3");
+                       Assert.IsNull (proj.EvaluatedProperties ["l"], "A4");
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidProjectFileException))]
+               [Category ("NotWorking")]
+               public void TestIncorrectCondition1 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <A Condition='x'>A</A>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+               }
+       }
+}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/EvaluationOrder.cs b/mcs/class/Microsoft.Build.Engine/Test/various/EvaluationOrder.cs
new file mode 100644 (file)
index 0000000..b046432
--- /dev/null
@@ -0,0 +1,379 @@
+//
+// EvaluationOrder.cs
+//
+// Author:
+//   Marek Sieradzki (marek.sieradzki@gmail.com)
+//
+// (C) 2006 Marek Sieradzki
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Xml;
+using Microsoft.Build.BuildEngine;
+using NUnit.Framework;
+
+namespace MonoTests.Microsoft.Build.BuildEngine.Various {
+       [TestFixture]
+       public class EvaluationOrder {
+               private string GetItems (Project proj, string name)
+               {
+                       BuildItemGroup big = proj.GetEvaluatedItemsByName (name);
+                       string str = String.Empty;
+                       if (big == null)
+                               return str;
+                       
+                       foreach (BuildItem bi in big) {
+                               if (str == String.Empty)
+                                       str = bi.FinalItemSpec;
+                               else 
+                                       str += ";" + bi.FinalItemSpec;
+                       }
+                       
+                       return str;
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestOrder1 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <ItemGroup>
+                                               <Item Include='A' />
+                                       </ItemGroup>
+
+                                       <PropertyGroup>
+                                               <Property>@(Item)</Property>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property"].FinalValue, "A1");
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property"].Value, "A2");
+                       Assert.AreEqual ("A", GetItems (proj, "Item"), "A3");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestOrder2 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <Property>@(Item)</Property>
+                                       </PropertyGroup>
+
+                                       <ItemGroup>
+                                               <Item Include='A' />
+                                       </ItemGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property"].FinalValue, "A1");
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property"].Value, "A2");
+                       Assert.AreEqual ("A", GetItems (proj, "Item"), "A3");
+               }
+
+               [Test]
+               public void TestOrder3 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <Property>A</Property>
+                                       </PropertyGroup>
+
+                                       <ItemGroup>
+                                               <Item Include='$(Property)' />
+                                       </ItemGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("A", proj.EvaluatedProperties ["Property"].FinalValue, "A1");
+                       Assert.AreEqual ("A", proj.EvaluatedProperties ["Property"].Value, "A2");
+                       Assert.AreEqual ("A", GetItems (proj, "Item"), "A3");
+               }
+
+               [Test]
+               public void TestOrder4 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <ItemGroup>
+                                               <Item Include='$(Property)' />
+                                       </ItemGroup>
+
+                                       <PropertyGroup>
+                                               <Property>A</Property>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("A", proj.EvaluatedProperties ["Property"].FinalValue, "A1");
+                       Assert.AreEqual ("A", proj.EvaluatedProperties ["Property"].Value, "A2");
+                       Assert.AreEqual ("A", GetItems (proj, "Item"), "A3");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestOrder5 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <ItemGroup>
+                                               <Item Include='$(Property)' />
+                                       </ItemGroup>
+
+                                       <PropertyGroup>
+                                               <Property>A</Property>
+                                               <Property2>@(Item)</Property2>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("A", proj.EvaluatedProperties ["Property"].FinalValue, "A1");
+                       Assert.AreEqual ("A", proj.EvaluatedProperties ["Property"].Value, "A2");
+                       Assert.AreEqual ("A", GetItems (proj, "Item"), "A3");
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property2"].FinalValue, "A4");
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property2"].Value, "A5");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestOrder6 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <ItemGroup>
+                                               <Item Include='A' />
+                                               <Item2 Include='$(Property)' />
+                                       </ItemGroup>
+
+                                       <PropertyGroup>
+                                               <Property>@(Item)</Property>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property"].FinalValue, "A1");
+                       Assert.AreEqual ("@(Item)", proj.EvaluatedProperties ["Property"].Value, "A2");
+                       Assert.AreEqual ("A", GetItems (proj, "Item"), "A3");
+                       Assert.AreEqual ("A", GetItems (proj, "Item2"), "A4");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestImportOrder1 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <Property>Test/resources/Import.csproj</Property>
+                                       </PropertyGroup>
+
+                                       <Import Project='$(Property)'/>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+
+               [Test]
+               [ExpectedException (typeof (InvalidProjectFileException),
+                       "The required attribute \"Project\" is missing from element <Import>.  ")]
+               [Category ("NotWorking")]
+               public void TestImportOrder2 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <Import Project='$(Property)'/>
+
+                                       <PropertyGroup>
+                                               <Property>Test/resources/Import.csproj</Property>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+
+               [Test]
+               // NOTE: It will try to import "@(Item)" instead of Test/...
+               [ExpectedException (typeof (InvalidProjectFileException))]
+               [Category ("NotWorking")]
+               public void TestImportOrder3 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <ItemGroup>
+                                               <Item Include='Test/resources/Import.csproj' />
+                                       </ItemGroup>
+
+                                       <Import Project='@(Item)'/>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+
+               [Test]
+               // NOTE: It will try to import "@(Item)" instead of Test/...
+               [ExpectedException (typeof (InvalidProjectFileException))]
+               [Category ("NotWorking")]
+               public void TestImportOrder4 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <Import Project='@(Item)'/>
+
+                                       <ItemGroup>
+                                               <Item Include='Test/resources/Import.csproj' />
+                                       </ItemGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestImportOrder5 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <PropertyGroup>
+                                               <ImportedProperty>AnotherValue</ImportedProperty>
+                                       </PropertyGroup>
+
+                                       <Import Project='Test/resources/Import.csproj'/>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("Value", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestImportOrder6 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <Import Project='Test/resources/Import.csproj'/>
+
+                                       <PropertyGroup>
+                                               <ImportedProperty>AnotherValue</ImportedProperty>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("AnotherValue", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("AnotherValue", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+
+               [Test]
+               [Category ("NotWorking")]
+               public void TestImportOrder7 ()
+               {
+                       Engine engine = new Engine (Consts.BinPath);
+                       Project proj = engine.CreateNewProject ();
+
+                       string documentString = @"
+                               <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+                                       <Import Project='Test/resources/Import.csproj'/>
+
+                                       <PropertyGroup>
+                                               <ImportedProperty>Another$(ImportedProperty)</ImportedProperty>
+                                       </PropertyGroup>
+                               </Project>
+                       ";
+
+                       proj.LoadXml (documentString);
+
+                       Assert.AreEqual ("AnotherValue", proj.EvaluatedProperties ["ImportedProperty"].FinalValue, "A1");
+                       Assert.AreEqual ("Another$(ImportedProperty)", proj.EvaluatedProperties ["ImportedProperty"].Value, "A2");
+               }
+       }
+}