private void AddComponent(OtherKey key, IServiceContainer addContainer, IServiceContainer searchContainer, Boolean beforeValue, Boolean addValue, Boolean afterValue)
 {
     Assert.AreEqual(beforeValue, searchContainer.HasComponent(key));
     if (addValue)
     {
         Assert.DoesNotThrow(() => addContainer.AddComponent(key, _entry));
     }
     else
     {
         Assert.Throws <ServiceAlreadyRegisteredException>(() => addContainer.AddComponent(key, _entry));
     }
     Assert.AreEqual(afterValue, searchContainer.HasComponent(key));
 }
 private void RemoveComponent(OtherKey key, IServiceContainer removeContainer, IServiceContainer searchContainer, Boolean beforeValue, Boolean afterValue)
 {
     Assert.AreEqual(beforeValue, searchContainer.HasComponent(key));
     Assert.DoesNotThrow(() => removeContainer.RemoveComponent(key));
     Assert.AreEqual(afterValue, searchContainer.HasComponent(key));
 }