public void UpdateTargetShouldNotPassNoValueFromSourceToTarget() { var sourceAdapter = new ValueAdapter(); var targetAdapter = new ValueAdapter(); var binding = new ValueBinding(targetAdapter, sourceAdapter); sourceAdapter.Value = SettingsConstants.NoValue; binding.UpdateTarget(); Assert.IsFalse(targetAdapter.SetValueCalled); }
public void UpdateTargetShouldPassValueFromSourceToTarget() { var sourceAdapter = new ValueAdapter(); var targetAdapter = new ValueAdapter(); var binding = new ValueBinding(targetAdapter, sourceAdapter); sourceAdapter.Value = 5; binding.UpdateTarget(); Assert.AreEqual(5, sourceAdapter.Value); }