ConvertBack() public méthode

public ConvertBack ( object value, Type targetType, object parameter, System culture ) : object
value object
targetType System.Type
parameter object
culture System
Résultat object
        public void WhenConvertBackCalledWithNonMatchThenUnsetValueReturned()
        {
            // Arrange
            var expected = DependencyProperty.UnsetValue;

            var value = new object();

            var target = new BooleanToKnownValueConverter();

            // Act
            var actual = target.ConvertBack(value, typeof(bool?), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.AreEqual(expected, actual);
        }
        public void WhenConvertBackCalledWithWhenNullThenNullReturned()
        {
            // Arrange
            var expected = (object)null;

            var value = new object();

            var target = new BooleanToKnownValueConverter();
            target.WhenNull = value;

            // Act
            var actual = target.ConvertBack(value, typeof(bool?), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.AreEqual(expected, actual);
        }