public void Should_return_as_default()
        {
            var builder = new ContainerBuilder();

            builder.CodeSwitchesDisabledbyDefault();

            IContainer container = builder.Build();

            var fooId = container.Resolve<ICodeSwitch<Active>>();

            Assert.IsFalse(fooId.Enabled);
        }
        public void Should_use_the_old_methods_by_default()
        {
            var builder = new ContainerBuilder();

            builder.CodeSwitchesDisabledbyDefault();

            builder.RegisterType<ConditionalClass>();

            var container = builder.Build();

            var conditionalClass = container.Resolve<ConditionalClass>();

            Assert.AreEqual("Old: 42, Test", conditionalClass.FunctionCall(42, "Test"));
        }
        public void Should_convert_to_specific()
        {
            var builder = new ContainerBuilder();

            builder.CodeSwitchesDisabledbyDefault();

            IContainer container = builder.Build();

            var fooId = container.Resolve<ICodeSwitch<Active>>();

            Assert.IsFalse(fooId.Enabled);

            container.EnableCodeSwitch<Active>();

            fooId = container.Resolve<ICodeSwitch<Active>>();

            Assert.IsTrue(fooId.Enabled);
        }