-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello, can I access IUnityContainer and register a dependency in it somewhere outside the RegisterInternal method?
public class MyRegistrar : RegistrarBase<IUnityContainer>
{
protected override void RegisterInternal(IUnityContainer container)
{
//
}
}
I have such a situation on my project that tests are launched only from the code like this:
public XmlNode SomeMethod(LargeObject obj)
{
var testPackage = new TestPackage(Assembly.GetExecutingAssembly().Location);
var runner = TestEngineActivator.CreateInstance().GetRunner(testPackage);
var result = runner.Run(null, TestFilter.Empty);
return result;
}
In the code above there is some object of LargeObject type, which exemplar I cannot create manually in the RegisterInternal method. I need to somehow register it in IUnityContainer for injection into the test, preferably directly in the SomeMethod method.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels