public void AutoFacResolver_DoesNot_Resolve_NonRegistered_ContactRepository_Test()
        {
            var builder = new ContainerBuilder();
            var container = builder.Build();

            var resolver = new AutoFacResolver(container);
            var instance = resolver.GetService(typeof(IContactRepository));

            Assert.IsNull(instance);
        }
        public void AutoFacResolver_DoesNot_Resolve_NonRegistered_ContactRepository_Test()
        {
            var builder   = new ContainerBuilder();
            var container = builder.Build();

            var resolver = new AutoFacResolver(container);
            var instance = resolver.GetService(typeof(IContactRepository));

            Assert.IsNull(instance);
        }
        public void AutoFacResolver_Resolves_Registered_ContactRepository_Test()
        {          
            var builder = new ContainerBuilder();
            builder.RegisterType<InMemoryContactRepository>().As<IContactRepository>();
            var container = builder.Build();

            var resolver = new AutoFacResolver(container);
            var instance = resolver.GetService(typeof(IContactRepository));

            Assert.IsNotNull(instance);
        }
        public void AutoFacResolver_Resolves_Registered_ContactRepository_Test()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <InMemoryContactRepository>().As <IContactRepository>();
            var container = builder.Build();

            var resolver = new AutoFacResolver(container);
            var instance = resolver.GetService(typeof(IContactRepository));

            Assert.IsNotNull(instance);
        }