Example #1
0
 public void NullContainerShouldThrow()
 {
     Action[] actions =
     {
         () => UnityContainerExtensions.RegisterLoggedType <IDummy, Dummy>(null),
         () => UnityContainerExtensions.RegisterLoggedType <IDummy, Dummy>(null, ""),
         () => UnityContainerExtensions.RegisterLoggedType <IDummy, Dummy>(null, new ContainerControlledLifetimeManager()),
         () => UnityContainerExtensions.RegisterLoggedType <IDummy, Dummy>(null, "", new ContainerControlledLifetimeManager())
     };
     foreach (var action in actions)
     {
         action.ShouldThrow <ArgumentNullException>();
     }
 }