public void GatewayClientObjectCreationWithParams() { Dictionary <string, string> data = IBMWIoTP.GatewayClient.parseFile("../../Resource/Gatewayprop.txt", "## Gateway Registration detail"); if (!data.TryGetValue("Organization-ID", out orgId) || !data.TryGetValue("Device-Type", out deviceType) || !data.TryGetValue("Device-ID", out deviceID) || !data.TryGetValue("Authentication-Method", out authmethod) || !data.TryGetValue("Authentication-Token", out authtoken)) { throw new Exception("Invalid property file"); } testClient = new IBMWIoTP.GatewayClient(orgId, deviceType, deviceID, authmethod, authtoken); }
public void DeviceClientObjectCreationWithValuesWithCA() { Dictionary <string, string> data = IBMWIoTP.GatewayClient.parseFile("../../Resource/Gatewayprop.txt", "## Gateway Registration detail"); if (!data.TryGetValue("Organization-ID", out orgId) || !data.TryGetValue("Device-Type", out deviceType) || !data.TryGetValue("Device-ID", out deviceID) || !data.TryGetValue("Authentication-Method", out authmethod) || !data.TryGetValue("Authentication-Token", out authtoken) || // !data.TryGetValue("CA-Certificate-Path",out caCertificatePath)|| // !data.TryGetValue("CA-Certificate-Password",out caCertificatePassword)|| !data.TryGetValue("Client-Certificate-Path", out clientCertificatePath) || !data.TryGetValue("Client-Certificate-Password", out clientCertificatePassword)) { throw new Exception("Invalid property file"); } testClient = new IBMWIoTP.GatewayClient(orgId, deviceType, deviceID, authmethod, authtoken, clientCertificatePath, clientCertificatePassword); }
public void GatewayClientObjectCreationWithinvalidFilePath() { testClient = new IBMWIoTP.GatewayClient("propInvalid.text"); }
public void GatewayClientObjectCreationWithFilePath() { testClient = new IBMWIoTP.GatewayClient("../../Resource/Gatewayprop.txt"); }
public void Setup() { testClient = new IBMWIoTP.GatewayClient("../../Resource/Gatewayprop.txt"); }
public void Setup() { IBMWIoTP.GatewayClient.AutoReconnect = false; testClient = new IBMWIoTP.GatewayClient("../../Resource/Gatewayprop.txt"); }