@@ -45,7 +45,7 @@ SCENARIO("A callback is registered via 'onUpdate' to be called on property chang
4545 thing.begin (&property_container);
4646
4747 CloudInt test = 10 ;
48- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (externalCallbackV2);
48+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (externalCallbackV2);
4949
5050 /* [{0: "test", 2: 7}] = 81 A2 00 64 74 65 73 74 02 07 */
5151 uint8_t const payload[] = {0x81 , 0xA2 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x02 , 0x07 };
@@ -75,7 +75,7 @@ SCENARIO("A (boolean) property is manipulated in the callback to its origin stat
7575 thing.begin (&property_container);
7676 cbor::encode (thing);
7777
78- property_container. addPropertyReal ( switch_turned_on, " switch_turned_on" , Permission::ReadWrite).onUpdate (switch_callback);
78+ addPropertyToContainer (property_container, switch_turned_on, " switch_turned_on" , Permission::ReadWrite).onUpdate (switch_callback);
7979
8080 /* [{0: "switch_turned_on", 4: true}] = 81 A2 00 70 73 77 69 74 63 68 5F 74 75 72 6E 65 64 5F 6F 6E 04 F5 */
8181 uint8_t const payload[] = {0x81 , 0xA2 , 0x00 , 0x70 , 0x73 , 0x77 , 0x69 , 0x74 , 0x63 , 0x68 , 0x5F , 0x74 , 0x75 , 0x72 , 0x6E , 0x65 , 0x64 , 0x5F , 0x6F , 0x6E , 0x04 , 0xF5 };
@@ -120,7 +120,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
120120 ArduinoCloudThing thing;
121121 thing.begin (&property_container);
122122
123- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
123+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
124124
125125 test.setLastLocalChangeTimestamp (1550138809 );
126126
@@ -148,7 +148,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
148148 ArduinoCloudThing thing;
149149 thing.begin (&property_container);
150150
151- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
151+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
152152 test = false ;
153153 test.setLastLocalChangeTimestamp (1550138811 );
154154
@@ -175,9 +175,9 @@ SCENARIO("Primitive property: After a connection/reconnection an incoming cbor p
175175 ArduinoCloudThing thing;
176176 thing.begin (&property_container);
177177
178- property_container. addPropertyReal ( *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
178+ addPropertyToContainer (property_container, *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
179179 test = false ;
180- property_container. updateTimestampOnLocallyChangedProperties ();
180+ updateTimestampOnLocallyChangedProperties (property_container );
181181 // There is no RTC on test execution environment so we force the local timestamp
182182 p->setLastLocalChangeTimestamp (1550138809 );
183183
@@ -206,9 +206,9 @@ SCENARIO("Primitive property: After a connection/reconnection an incoming cbor p
206206 ArduinoCloudThing thing;
207207 thing.begin (&property_container);
208208
209- property_container. addPropertyReal ( *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
209+ addPropertyToContainer (property_container, *p, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
210210 test = false ;
211- property_container. updateTimestampOnLocallyChangedProperties ();
211+ updateTimestampOnLocallyChangedProperties (property_container );
212212 // There is no RTC on test execution environment so we force the local timestamp
213213 p->setLastLocalChangeTimestamp (1550138811 );
214214
@@ -234,7 +234,7 @@ SCENARIO("Object property: After a connection/reconnection an incoming cbor payl
234234 ArduinoCloudThing thing;
235235 thing.begin (&property_container);
236236
237- property_container. addPropertyReal ( location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
237+ addPropertyToContainer (property_container, location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
238238 location_test.setLastLocalChangeTimestamp (1550138809 );
239239
240240 /* [{-3: 1550138810.00, 0: "test:lat", 3: 2},{0: "test:lon", 3: 3}] = 82 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 68 74 65 73 74 3A 6C 61 74 02 02 A2 00 68 74 65 73 74 3A 6C 6F 6E 02 03*/
@@ -266,7 +266,7 @@ SCENARIO("Object property: After a connection/reconnection an incoming cbor payl
266266 ArduinoCloudThing thing;
267267 thing.begin (&property_container);
268268
269- property_container. addPropertyReal ( location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
269+ addPropertyToContainer (property_container, location_test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (auto_sync_callback);
270270 location_test.setLastLocalChangeTimestamp (1550138811 );
271271
272272 /* [{-3: 1550138810.00, 0: "test:lat", 3: 2},{0: "test:lon", 3: 3}] = 82 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 68 74 65 73 74 3A 6C 61 74 02 02 A2 00 68 74 65 73 74 3A 6C 6F 6E 02 03*/
@@ -304,7 +304,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
304304 ArduinoCloudThing thing;
305305 thing.begin (&property_container);
306306
307- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_device_sync_callback);
307+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_device_sync_callback);
308308
309309 /* [{-3: 1550138810.00, 0: "test", 4: true}] = 81 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 64 74 65 73 74 04 F5 */
310310 uint8_t const payload[] = {0x81 , 0xA3 , 0x22 , 0xFB , 0x41 , 0xD7 , 0x19 , 0x4F , 0x6E , 0x80 , 0x00 , 0x00 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x04 , 0xF5 };
@@ -337,7 +337,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed
337337 ArduinoCloudThing thing;
338338 thing.begin (&property_container);
339339
340- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_cloud_sync_callback);
340+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback).onSync (force_cloud_sync_callback);
341341
342342 /* [{-3: 1550138810.00, 0: "test", 4: true}] = 81 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 64 74 65 73 74 04 F5 */
343343 uint8_t const payload[] = {0x81 , 0xA3 , 0x22 , 0xFB , 0x41 , 0xD7 , 0x19 , 0x4F , 0x6E , 0x80 , 0x00 , 0x00 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x04 , 0xF5 };
@@ -364,7 +364,7 @@ SCENARIO("After a connection/reconnection an incoming cbor payload is processed.
364364 ArduinoCloudThing thing;
365365 thing.begin (&property_container);
366366
367- property_container. addPropertyReal ( test, " test" , Permission::ReadWrite).onUpdate (change_callback);
367+ addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite).onUpdate (change_callback);
368368
369369 /* [{-3: 1550138810.00, 0: "test", 4: true}] = 81 A3 22 FB 41 D7 19 4F 6E 80 00 00 00 64 74 65 73 74 04 F5 */
370370 uint8_t const payload[] = {0x81 , 0xA3 , 0x22 , 0xFB , 0x41 , 0xD7 , 0x19 , 0x4F , 0x6E , 0x80 , 0x00 , 0x00 , 0x00 , 0x64 , 0x74 , 0x65 , 0x73 , 0x74 , 0x04 , 0xF5 };
0 commit comments