Ejemplo n.º 1
0
        public void Clone()
        {
            var f1 = new ServiceFactory <IThing>
            {
                Creator = () => new Thing()
            };

            var f2 = f1.Clone();

            var s = f2.Create();

            Assert.That(s, Is.Not.Null);
            Assert.That(s, Is.InstanceOf <Thing>());
            Assert.That(f2.Create(), Is.Not.SameAs(s));
            Assert.That(f1.Create(), Is.Not.SameAs(s));
        }