public async Task SfdcConnectionTestAndVersionParametersAwaitAsync() { SfdcConnection conn = new SfdcConnection(true, 36); conn.Username = username; conn.Password = password; conn.Token = token; CancellationToken cancelToken = new CancellationToken(); await conn.OpenAsync(cancelToken); int i = 0; while (conn.State == ConnectionState.Connecting && i < 60) { Thread.Sleep(1000); i++; } Assert.IsTrue(conn.State == ConnectionState.Open); conn.Close(); Assert.IsTrue(conn.State == ConnectionState.Closed); }
public void SfdcConnectionUriParameterAsyncSpecifyFunction() { SfdcConnection conn = new SfdcConnection(string.Format("https://test.salesforce.com/services/Soap/u/{0}.0", 36)); conn.Username = username; conn.Password = password; conn.Token = token; conn.customLoginCompleted += Conn_loginCompleted; conn.OpenAsync(); int i = 0; while (conn.State == ConnectionState.Connecting && i < 60) { Thread.Sleep(1000); i++; } Assert.IsTrue(conn.State == ConnectionState.Open); conn.Close(); Assert.IsTrue(conn.State == ConnectionState.Closed); }
public void SfdcConnectionTestAndVersionParameters() { SfdcConnection conn = new SfdcConnection(true, 36); conn.Username = username; conn.Password = password; conn.Token = token; conn.Open(); conn.Close(); }
public void SfdcConnectionUriParameter() { SfdcConnection conn = new SfdcConnection(string.Format("https://test.salesforce.com/services/Soap/u/{0}.0/", 36)); conn.Username = username; conn.Password = password; conn.Token = token; conn.Open(); conn.Close(); }
public async Task SfdcConnectionUriParameterAwaitAsync() { SfdcConnection conn = new SfdcConnection(string.Format("https://test.salesforce.com/services/Soap/u/{0}.0", 36)); conn.Username = username; conn.Password = password; conn.Token = token; await conn.OpenAsync(default(CancellationToken)); int i = 0; while (conn.State == ConnectionState.Connecting && i < 60) { Thread.Sleep(1000); i++; } Assert.IsTrue(conn.State == ConnectionState.Open); conn.Close(); Assert.IsTrue(conn.State == ConnectionState.Closed); }