diff --git a/.hgignore b/.hgignore index 00d15820b6..67d8cb7ca9 100644 --- a/.hgignore +++ b/.hgignore @@ -42,3 +42,4 @@ build/UmbracoCms.AllBinaries.zip build/UmbracoCms.WebPI.zip build/UmbracoCms.zip src/Umbraco.Tests/config/applications.config +src/Umbraco.Tests/config/trees.config diff --git a/test/umbraco.Test/ApplicationTreeTest.cs b/src/Umbraco.Tests/BusinessLogic/ApplicationTreeTest.cs similarity index 95% rename from test/umbraco.Test/ApplicationTreeTest.cs rename to src/Umbraco.Tests/BusinessLogic/ApplicationTreeTest.cs index 284015cfaf..109e8178cf 100644 --- a/test/umbraco.Test/ApplicationTreeTest.cs +++ b/src/Umbraco.Tests/BusinessLogic/ApplicationTreeTest.cs @@ -1,9 +1,9 @@ -using umbraco.BusinessLogic; -using Microsoft.VisualStudio.TestTools.UnitTesting; +using NUnit.Framework; +using umbraco.BusinessLogic; using System; using System.Linq; -namespace Umbraco.LegacyTests +namespace Umbraco.Tests.BusinessLogic { @@ -11,8 +11,8 @@ namespace Umbraco.LegacyTests ///This is a test class for ApplicationTreeTest and is intended ///to contain all ApplicationTreeTest Unit Tests /// - [TestClass()] - public class ApplicationTreeTest + [TestFixture()] + public class ApplicationTreeTest : BaseTest { @@ -20,7 +20,7 @@ namespace Umbraco.LegacyTests /// /// Creates a new app tree linked to an application, then delete the application and make sure the tree is gone as well /// - [TestMethod()] + [Test()] public void ApplicationTree_Make_New_Then_Delete_App() { //create new app @@ -40,7 +40,7 @@ namespace Umbraco.LegacyTests app.Delete(); //check that the tree is gone - Assert.AreEqual(0, ApplicationTree.getApplicationTree(name).Count()); + Assert.AreEqual(0, ApplicationTree.getApplicationTree(name).Count()); } diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 9e58738611..1b9497bb66 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -45,6 +45,7 @@ + diff --git a/src/umbraco.businesslogic/ApplicationTree.cs b/src/umbraco.businesslogic/ApplicationTree.cs index a4d4a33d9b..7d1de8e8a8 100644 --- a/src/umbraco.businesslogic/ApplicationTree.cs +++ b/src/umbraco.businesslogic/ApplicationTree.cs @@ -471,8 +471,8 @@ namespace umbraco.BusinessLogic { lock (Locker) { - var doc = File.Exists(TreeConfigFileName) - ? XDocument.Load(TreeConfigFileName) + var doc = File.Exists(TreeConfigFilePath) + ? XDocument.Load(TreeConfigFilePath) : XDocument.Parse(""); if (doc.Root != null) { @@ -480,7 +480,7 @@ namespace umbraco.BusinessLogic if (saveAfterCallback) { - doc.Save(TreeConfigFileName); + doc.Save(TreeConfigFilePath); ReCache(); } diff --git a/test/umbraco.Test/Umbraco.LegacyTests.csproj b/test/umbraco.Test/Umbraco.LegacyTests.csproj index 4a2a3464cf..b609192892 100644 --- a/test/umbraco.Test/Umbraco.LegacyTests.csproj +++ b/test/umbraco.Test/Umbraco.LegacyTests.csproj @@ -121,7 +121,6 @@ Properties\SolutionInfo.cs -