Validate() public method

Validates the connection and returns an enumeration that indicates success or failure.
public Validate ( Microsoft infoEvents ) : Microsoft.SqlServer.Dts.Runtime.DTSExecResult
infoEvents Microsoft An object that implements the Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events interface to raise errors, warning, or informational events.
return Microsoft.SqlServer.Dts.Runtime.DTSExecResult
 public void ValidateReturnsSuccessIfUserNameEmptyTest()
 {
     MongoConnectionManager target = new MongoConnectionManager();
     target.ServerName = "server123";
     target.DatabaseName = "db123";
     target.UserName = "";
     target.Password = "******";
     IDTSInfoEvents infoEvents = null;
             DTSExecResult expected = DTSExecResult.Success;
     DTSExecResult actual = default(DTSExecResult);
     actual = target.Validate(infoEvents);
     Assert.AreEqual(expected, actual);
 }