Unit test over Autofac Module to reach 100% code coverage

Viewed 12327

We have a core library which make complex calculations and we consider it critical and we want to have a code coverage of 100% on that library. We now have 96% which is great, but we cant get the 100% because of this class:

public class IoCModule : Autofac.Module
{
    protected override void Load(Autofac.ContainerBuilder builder)
    {
        builder.RegisterType<SomeMathServiceA>().As<ISomeMathServiceA>();
        builder.RegisterType<SomeMathServiceB>().As<ISomeMathServiceB>(); 

        //... more registrations
    }
 }

I dont know how to test it, or if we really need to test it.

I have tried a unit test that take this module and create an IContainer and resolves every register dependency but some services access DB and config files which are very complex to mock in this context.

Done!!!! enter image description here

2 Answers
Related