Convert() public method

public Convert ( object value, Type targetType, object parameter, System culture ) : object
value object
targetType System.Type
parameter object
culture System
return object
コード例 #1
0
        public void Convert_True()
        {
            // Arrange
            var converter = new InverseBoolToVisibilityConverter();

            // Act
            var result = (Visibility)converter.Convert(true, null, null, null);

            // Assert
            Assert.AreEqual(Visibility.Collapsed, result);
        }
コード例 #2
0
        public void Convert_False()
        {
            // Arrange
            var converter = new InverseBoolToVisibilityConverter();

            // Act
            var result = (Visibility)converter.Convert(false, null, null, null);

            // Assert
            Assert.AreEqual(Visibility.Visible, result);
        }