public void RegisterByInterfaceShouldWorksWell()
        {
            // GIVEN
            IoCContainer container = new IoCContainer();

            // WHEN
            TestContractFirst obj = new TestContractFirst();

            container.RegisterSingle <TestContract>(obj);
            Action create = () => container.Get <TestContract>();

            // THEN
            create.ShouldNotThrow();
        }
        public void ReassignShouldWorksWell()
        {
            // GIVEN
            IoCContainer container = new IoCContainer();

            // WHEN
            TestContractFirst  objFirst  = new TestContractFirst();
            TestContractSecond objSecond = new TestContractSecond();

            container.RegisterSingle <TestContract>(objFirst);
            Action       reassign = () => container.RegisterSingle <TestContract>(objSecond, true);
            TestContract result   = null;
            Action       get      = () => result = container.Get <TestContract>();

            // THEN
            reassign.ShouldNotThrow();
            get.ShouldNotThrow();
            result.Should().Be(objSecond);
        }