public AgentTestBase() { _connector = new AgentConnector() { Host = _host }; }
public async Task Authentication_ConnectConcurrently2ConnectorsToTestMasterShouldSucceed() { //Arrange bool signInResult1 = await _connector.SignIn(Identity, true); var secondConnector = new AgentConnector() { Host = _host }; var secondIdentity = CreateUserIdentity(); bool signInResult2 = await secondConnector.SignIn(secondIdentity, true); //Act var result1 = await _connector.Connect(); var result2 = await secondConnector.Connect(); //Assert Assert.True(signInResult1, "Sign-in first connector failed."); Assert.True(signInResult2, "Sign-in second connector failed."); Assert.True(result1, "Connect first connector failed."); Assert.True(result2, "Connect second connector failed."); await _connector.SignOut(); await secondConnector.SignOut(); }
public async Task <bool> Connect(string host, int sessionId) { bool result = false; var signInData = new UserIdentity() { Login = $"agent{sessionId}@eltra.ch", Password = "******" }; _connector = new AgentConnector() { Host = host }; if (await _connector.SignIn(signInData, true)) { var deviceIdentity = new UserIdentity() { Login = "******", Password = "******" }; if (!await _connector.Connect(deviceIdentity)) { Console.WriteLine("uups, no connection, timeout!"); } else { result = true; } } return(result); }
/// <summary> /// Unbind /// </summary> /// <param name="channel"></param> /// <param name="connector"></param> /// <returns></returns> public static async Task <bool> Unbind(this Channel channel, AgentConnector connector) { bool result = false; if (connector != null) { result = await connector.UnbindChannel(channel); } return(result); }
public StreemaTest() { string host = "https://eltra.ch"; //string host = "http://localhost:5001"; _connector = new AgentConnector() { Host = host }; }
public AgentConnectorTestData(AgentConnector connector, UserIdentity identity) { _connector = connector; _identity = identity; }
public RelayVcs(AgentConnector connector, EltraDevice device) : base(connector, device) { }
public VirtualCommandSet CreateVcs(AgentConnector agent, EltraDevice device) { return(new RelayVcs(agent, device)); }