public void ShouldSetValueToSourceAdapterWhenSettingValue() { var converter = new NullValueConverter(); var sourceAdapter = new ValueAdapter(); var adapter = new ConvertingAdapter(sourceAdapter, converter); adapter.SetValue(5); Assert.AreEqual(5, sourceAdapter.Value); }
public void ShouldSetConvertedValueWhenSettingValue() { var converter = new ValueConverter { ReturnedTarget = 5 }; var sourceAdapter = new ValueAdapter(); var adapter = new ConvertingAdapter(sourceAdapter, converter); adapter.SetValue(null); Assert.AreEqual(5, sourceAdapter.Value); }