public void Connect_WhenCredentialsNull_ThrowsArgumentNullException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = null, Host = "tatata" }); }
public void Connect_WhenHostDoesNotExist_ThrowsServerConnectionException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = "******" }, Host = "tatata" }); }
public void Connect_WhenUsernameNull_ThrowsArgumentNullException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = null }, Host = "10.1.10.1" }); }
public void Connect_WhenHostNull_ThrowsArgumentNullException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = "******" }, Host = null }); }
public void Connect_WhenInvalidUsername_ThrowsServerConnectionException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = "******" }, Host = "10.1.10.1" }); }
public void Connect_WhenInvalidPassword_ThrowsServerConnectionException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = "******", Password = "******" }, Host = "10.1.10.1" }); }
public void Connect_WhenConnectionTimeOut_ThrowsWindowsOperationTimeoutException() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = "******", Password = null }, Host = "10.1.10.1", Timeout = TimeSpan.Zero }); }
public void Connect_WhenValidUserAndPassword_IsConnected() { IServerConnectionService connection = new PowerShellConnectionService(); connection.Connect(new ServerConnection { Credential = new ServerCredential { Username = "******", Password = "" }, Host = "10.1.10.1", Port = 443 }); Assert.IsTrue(connection.IsConnected); }