Skip to content

Commit

Permalink
Update GitHubIssues.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
ENikS authored Nov 16, 2017
1 parent 8c9c79d commit e686e02
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/Unity.Tests/GitHubIssues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,35 @@ namespace GitHub
[TestClass]
public class Issues
{
[TestMethod]
public void unity_154()
{
IUnityContainer container = new UnityContainer();
container.RegisterType<OtherEmailService>(new ContainerControlledLifetimeManager());
container.RegisterType<IService, OtherEmailService>();
container.RegisterType<IOtherService, OtherEmailService>();

Assert.AreSame(container.Resolve<IService>(), container.Resolve<IOtherService>());
}


[TestMethod]
public void unity_153()
{
IUnityContainer rootContainer = new UnityContainer();
rootContainer.RegisterType<ILogger, MockLogger>(new HierarchicalLifetimeManager());

using (IUnityContainer childContainer = rootContainer.CreateChildContainer())
{
var a = childContainer.Resolve<ILogger>();
var b = childContainer.Resolve<ILogger>();

Assert.AreSame(a, b);
}
}



[TestMethod]
public void Issue_35()
{
Expand Down

0 comments on commit e686e02

Please sign in to comment.