public void ActivatingAProvidedInstanceTwice_RaisesException()
        {
            object instance = new object();

            ProvidedInstanceActivator target =
                new ProvidedInstanceActivator(instance);

            target.ActivateInstance(Factory.EmptyContainer, Factory.NoParameters);

            Assert.Throws<InvalidOperationException>(delegate
            {
                target.ActivateInstance(Factory.EmptyContainer, Factory.NoParameters);
            });
        }
        public void WhenInitializedWithInstance_ThatInstanceIsReturnedFromActivateInstance()
        {
            object instance = new object();

            ProvidedInstanceActivator target = new ProvidedInstanceActivator(instance);

            var actual = target.ActivateInstance(Factory.EmptyContainer, Factory.NoParameters);

            Assert.Same(instance, actual);
        }