| | |
| | | properties.setPort(8883); |
| | | properties.setThingName("thing-a"); |
| | | |
| | | Assertions.assertEquals("ssl://example-ats.iot.cn-north-1.amazonaws.com.cn:8883", properties.getServerUri()); |
| | | Assertions.assertEquals("thing-a", properties.getResolvedClientId()); |
| | | Assertions.assertEquals("mqtts://example-ats.iot.cn-north-1.amazonaws.com.cn:8883", properties.getServerUri()); |
| | | String thingId = properties.getResolvedClientId(); |
| | | Assertions.assertNotNull(thingId); |
| | | Assertions.assertTrue(thingId.startsWith("thing-a-")); |
| | | Assertions.assertEquals(thingId, properties.getResolvedClientId()); |
| | | |
| | | properties.setClientId("client-b"); |
| | | Assertions.assertEquals("client-b", properties.getResolvedClientId()); |
| | | IotProperties withClient = new IotProperties(); |
| | | withClient.setClientId("client-b"); |
| | | String cid = withClient.getResolvedClientId(); |
| | | Assertions.assertNotNull(cid); |
| | | Assertions.assertTrue(cid.startsWith("client-b-")); |
| | | Assertions.assertEquals(cid, withClient.getResolvedClientId()); |
| | | } |
| | | |
| | | @Test |