Got ApplicationTreeTest working in new NUnit test project.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
///</summary>
|
||||
[TestClass()]
|
||||
public class ApplicationTreeTest
|
||||
[TestFixture()]
|
||||
public class ApplicationTreeTest : BaseTest
|
||||
{
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Umbraco.LegacyTests
|
||||
/// <summary>
|
||||
/// Creates a new app tree linked to an application, then delete the application and make sure the tree is gone as well
|
||||
///</summary>
|
||||
[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<int>(0, ApplicationTree.getApplicationTree(name).Count());
|
||||
Assert.AreEqual(0, ApplicationTree.getApplicationTree(name).Count());
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BusinessLogic\ApplicationTest.cs" />
|
||||
<Compile Include="BusinessLogic\ApplicationTreeTest.cs" />
|
||||
<Compile Include="BusinessLogic\BaseTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -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("<?xml version=\"1.0\"?><trees />");
|
||||
if (doc.Root != null)
|
||||
{
|
||||
@@ -480,7 +480,7 @@ namespace umbraco.BusinessLogic
|
||||
|
||||
if (saveAfterCallback)
|
||||
{
|
||||
doc.Save(TreeConfigFileName);
|
||||
doc.Save(TreeConfigFilePath);
|
||||
|
||||
ReCache();
|
||||
}
|
||||
|
||||
@@ -121,7 +121,6 @@
|
||||
<Compile Include="..\..\src\SolutionInfo.cs">
|
||||
<Link>Properties\SolutionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="ApplicationTreeTest.cs" />
|
||||
<Compile Include="DataTypeDefinitionTest.cs" />
|
||||
<Compile Include="DictionaryTest.cs" />
|
||||
<Compile Include="DocumentTest.cs" />
|
||||
|
||||
Reference in New Issue
Block a user