mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00

Projects access of per-unit-of-work components (request lifetime scope) for singleton (per shell lifetime scope) components Preparing to rationalize and eliminate the various ah-hoc container and scoping abstractions --HG-- branch : dev
21 lines
559 B
C#
21 lines
559 B
C#
using Autofac;
|
|
using NUnit.Framework;
|
|
using Orchard.Tests.Utility;
|
|
|
|
namespace Orchard.Tests {
|
|
public class ContainerTestBase {
|
|
|
|
protected IContainer _container;
|
|
|
|
[SetUp]
|
|
public virtual void Init() {
|
|
var builder = new ContainerBuilder();
|
|
Register(builder);
|
|
_container = builder.Build();
|
|
Resolve(_container);
|
|
}
|
|
|
|
protected virtual void Register(ContainerBuilder builder) { }
|
|
protected virtual void Resolve(IContainer container) { }
|
|
}
|
|
} |