Convert() public method

Converts a value.
public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The value produced by the binding source.
targetType System.Type The type of the binding target property.
parameter object The converter parameter to use.
culture System.Globalization.CultureInfo The culture to use in the converter.
return object
 public void DeployViewConnectedToVisiblityConverter_Convert_EnvironmentModelIsNull_VisibilityIsCollapsed()
 {
     //Arrange
     var converter = new DeployViewConnectedToVisiblityConverter();
     //Act
     var actual = (Visibility)converter.Convert(null, typeof(bool), null, null);
     //Assert
     Assert.AreEqual(Visibility.Collapsed, actual);
 }
        public void DeployViewConnectedToVisiblityConverter_Convert_IsConnectedIsTrue_VisibilityIsCollapsed()
        {
            //Arrange
            var converter = new DeployViewConnectedToVisiblityConverter();
            Mock<IEnvironmentConnection> mockEnvironmentConnection = new Mock<IEnvironmentConnection>();
            mockEnvironmentConnection.Setup(m => m.ServerEvents).Returns(new Mock<IEventPublisher>().Object);
            mockEnvironmentConnection.Setup(m => m.IsConnected).Returns(true);
            IEnvironmentModel environmentModel = new EnvironmentModel(Guid.NewGuid(), mockEnvironmentConnection.Object, new Mock<IStudioResourceRepository>().Object);

            //Act
            var actual = (Visibility)converter.Convert(environmentModel, typeof(bool), null, null);
            //Assert
            Assert.AreEqual(Visibility.Visible, actual);
        }