I am using Unity in an ASP.NET project (not MVC). It seems that the Unit Tests need to be aware of Unity, create an IoC container and insert Mocks into that, unlike the other unit testing frameworks I have used.
The examples of resolving classes using Unity seems to be either:
public class Foo
{
[Dependency]
private ILogger Logger { set; get; }
}
or resolving directly from the container:
UnityTest.Interfaces.IMenuBL ser = Global.Container.Resolve<UnityTest.Interfaces.IMenuBL>();
Is it possible, in non-MVC ASP.NET to have Unity perform constructor injection so that my unit tests aren't tied to my IoC container?
Cheers
Dave