Fixing MacroTests that had a dependency on the Profiler, which wasn't setup in the fixture.

This commit is contained in:
Morten Christensen
2013-05-22 11:24:46 -02:00
parent 41b17160f7
commit e870db3c29

View File

@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web.Caching;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.Profiling;
using umbraco;
using umbraco.cms.businesslogic.macro;
@@ -20,11 +18,17 @@ namespace Umbraco.Tests.Macros
{
//we DO want cache enabled for these tests
ApplicationContext.Current = new ApplicationContext(true);
ProfilerResolver.Current = new ProfilerResolver(new LogProfiler())
{
CanResolveBeforeFrozen = true
};
}
[TearDown]
public void TearDown()
{
ProfilerResolver.Current.DisposeIfDisposable();
ProfilerResolver.Reset();
ApplicationContext.Current.ApplicationCache.ClearAllCache();
ApplicationContext.Current.DisposeIfDisposable();
ApplicationContext.Current = null;