Esempio n. 1
0
		public void CloneBase()
		{
			ClonableBase b = new ClonableBase { Count = 3 };
			ClonableBase b2 = b.Clone();
			Assert.That(b2, Is.Not.SameAs(b));
			Assert.That(b2.Count, Is.EqualTo(b.Count));
		}
Esempio n. 2
0
        public void CloneBase()
        {
            ClonableBase b = new ClonableBase {
                Count = 3
            };
            ClonableBase b2 = b.Clone();

            Assert.That(b2, Is.Not.SameAs(b));
            Assert.That(b2.Count, Is.EqualTo(b.Count));
        }
Esempio n. 3
0
        public void CloneDerivedAsBase()
        {
            ClonableBase b = new ClonableDerived {
                Count = 3, Name = "Test"
            };
            ClonableBase b2 = b.Clone();

            Assert.That(b2, Is.Not.SameAs(b));
            Assert.That(b2.Count, Is.EqualTo(b.Count));
            Assert.That(b2, Is.TypeOf <ClonableDerived>());
            Assert.That(((ClonableDerived)b2).Name, Is.EqualTo(((ClonableDerived)b).Name));
        }
Esempio n. 4
0
 protected ClonableBase(ClonableBase other)
 {
     Count = other.Count;
 }
Esempio n. 5
0
		protected ClonableBase(ClonableBase other)
		{
			Count = other.Count;
		}