Files
Umbraco-CMS/src/Umbraco.Tests/DependencyInjection/ResolverBaseTest.cs

42 lines
1.0 KiB
C#
Raw Normal View History

2017-07-20 11:21:28 +02:00
using System.Collections.Generic;
using System.Reflection;
using Moq;
using NUnit.Framework;
using Umbraco.Core.Cache;
2017-05-30 15:46:25 +02:00
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
2016-11-07 19:12:09 +01:00
namespace Umbraco.Tests.DI
{
2016-08-25 15:09:51 +02:00
public abstract class ResolverBaseTest // fixme rename, do something!
{
2017-05-30 15:33:13 +02:00
protected TypeLoader TypeLoader { get; private set; }
protected ProfilingLogger ProfilingLogger { get; private set; }
[SetUp]
public void Initialize()
{
ProfilingLogger = new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>());
TypeLoader = new TypeLoader(NullCacheProvider.Instance,
ProfilingLogger,
false)
{
AssembliesToScan = AssembliesToScan
};
}
2016-08-07 16:45:41 +02:00
[TearDown]
public void TearDown()
{
2016-08-19 11:13:19 +02:00
Current.Reset();
2016-08-07 16:45:41 +02:00
}
2017-07-20 11:21:28 +02:00
protected virtual IEnumerable<Assembly> AssembliesToScan
=> new[]
{
2016-08-25 15:09:51 +02:00
GetType().Assembly // this assembly only
};
}
2017-07-20 11:21:28 +02:00
}