public void SavingDefaultInheritanceExportsAllProperties(PropertyInfo property)
        {
            var saveTarget = new ConnectionInfoInheritance(new ConnectionInfo(), true);

            saveTarget.TurnOffInheritanceCompletely();
            DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();

            DefaultConnectionInheritance.Instance.SaveTo(saveTarget);

            var valueInDestination = property.GetValue(saveTarget);
            var valueInSource      = property.GetValue(DefaultConnectionInheritance.Instance);

            Assert.That(valueInDestination, Is.EqualTo(valueInSource));
        }
Example #2
0
 public void TurnOffInheritanceCompletely()
 {
     _inheritance.Username = true;
     _inheritance.TurnOffInheritanceCompletely();
     Assert.That(AllInheritancePropertiesAreFalse(), Is.True);
 }