# Implementing Unit Testing

**URL:** <https://forum.litium.com/t/implementing-unit-testing/237>\
**Category:** Questions\
**Tags:** test\
**Created:** [September 11, 2018, 7:18am UTC](https://forum.litium.com/t/implementing-unit-testing/237 "2018-09-11T07:18:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenM](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@StephenM](https://forum.litium.com/u/StephenM)\
**Post date:** [September 11, 2018, 7:18am UTC](https://forum.litium.com/t/implementing-unit-testing/237/1 "2018-09-11T07:18:20Z")

</div>

I am implementing unit tests and would like to make use of the LitiumApplicationTestBase installed by the Litium.Xunit.Bootstrapper but I keep getting the follwoing error from my test runner when my unit test class inherits from LitiumApplicationTestBase :

System.Exception: Application was not able to find IoC container. Ensure that Litium.Infrastructure.InversionOfControl exists in your applications assembly folder.

Digging a little deeper I find the following message:

System.MissingMethodException Method not found: ‘Castle.MicroKernel.Registration.ComponentRegistration`1<!0> Castle.MicroKernel.Registration.ComponentRegistration`1.UsingFactoryMethod(System.Converter`2\<Castle.MicroKernel.IKernel,!!0\>, Boolean)’.

Of course I have installed the Litium.Infrastructure.InversionOfControl package to no avail. Any tips? Or will this just not work in version 5?

Litium version: 5.6.4-patch-1809031535

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [September 11, 2018, 9:06am UTC](https://forum.litium.com/t/implementing-unit-testing/237/2 "2018-09-11T09:06:33Z")

</div>

Did you install the `Litium.Setup.Complete` package?  
Are you using the version of the `Castle*` packages that we are using in the installation package?

---

<div class="post-metadata">

**Author:** ![StephenM](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@StephenM](https://forum.litium.com/u/StephenM)\
**Post date:** [September 11, 2018, 9:20am UTC](https://forum.litium.com/t/implementing-unit-testing/237/3 "2018-09-11T09:20:11Z")

</div>

I installed Litium.Setup.Complete and I guess it allows the installation of the latest version of Castle since version 4 was installed. I’ve reverted this to version 3.3.3 since Litium 5 is not compatible with version 4.

Thanks! Fixing the installed Castle package did the trick. (of course I had a **facepalm** moment here)
