@@ -40,7 +40,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
40
40
WHEN (" A boolean property is changed via CBOR message" )
41
41
{
42
42
PropertyContainer property_container;
43
-
43
+
44
44
CloudBool test = true ;
45
45
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
46
46
@@ -58,7 +58,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
58
58
{
59
59
/* An integer identifier has been encoded instead of the name of the property in order to have a shorter payload*/
60
60
PropertyContainer property_container;
61
-
61
+
62
62
CloudBool test = true ;
63
63
/* The property is added with identifier 1 that will be used instead of the string "test" as property identifier*/
64
64
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite, 1 );
@@ -76,7 +76,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
76
76
WHEN (" A positive int property is changed via CBOR message" )
77
77
{
78
78
PropertyContainer property_container;
79
-
79
+
80
80
CloudInt test = 0 ;
81
81
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
82
82
@@ -91,7 +91,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
91
91
WHEN (" A negative int property is changed via CBOR message" )
92
92
{
93
93
PropertyContainer property_container;
94
-
94
+
95
95
CloudInt test = 0 ;
96
96
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
97
97
@@ -108,7 +108,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
108
108
WHEN (" A float property is changed via CBOR message" )
109
109
{
110
110
PropertyContainer property_container;
111
-
111
+
112
112
CloudFloat test = 0 .0f ;
113
113
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
114
114
@@ -125,7 +125,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
125
125
WHEN (" A String property is changed via CBOR message" )
126
126
{
127
127
PropertyContainer property_container;
128
-
128
+
129
129
CloudString str_test;
130
130
str_test = " test" ;
131
131
addPropertyToContainer (property_container, str_test, " test" , Permission::ReadWrite);
@@ -142,7 +142,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
142
142
WHEN (" A Location property is changed via CBOR message" )
143
143
{
144
144
PropertyContainer property_container;
145
-
145
+
146
146
CloudLocation location_test = CloudLocation (0 , 1 );
147
147
addPropertyToContainer (property_container, location_test, " test" , Permission::ReadWrite);
148
148
@@ -160,7 +160,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
160
160
WHEN (" A Color property is changed via CBOR message" )
161
161
{
162
162
PropertyContainer property_container;
163
-
163
+
164
164
CloudColor color_test = CloudColor (0.0 , 0.0 , 0.0 );
165
165
166
166
addPropertyToContainer (property_container, color_test, " test" , Permission::ReadWrite);
@@ -184,7 +184,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
184
184
{
185
185
/* An integer identifier has been encoded instead of the name of the property in order to have a shorter payload*/
186
186
PropertyContainer property_container;
187
-
187
+
188
188
CloudColor color_test = CloudColor (0.0 , 0.0 , 0.0 );
189
189
190
190
/* The property is added with identifier 1 that will be used instead of the string "test" as property identifier*/
@@ -208,7 +208,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
208
208
WHEN (" A ColoredLight property is changed via CBOR message" )
209
209
{
210
210
PropertyContainer property_container;
211
-
211
+
212
212
CloudColoredLight color_test = CloudColoredLight (false , 0.0 , 0.0 , 0.0 );
213
213
214
214
addPropertyToContainer (property_container, color_test, " test" , Permission::ReadWrite);
@@ -232,7 +232,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
232
232
WHEN (" A Television property is changed via CBOR message" )
233
233
{
234
234
PropertyContainer property_container;
235
-
235
+
236
236
CloudTelevision tv_test = CloudTelevision (false , 0 , false , PlaybackCommands::Stop, InputValue::AUX1, 0 );
237
237
238
238
addPropertyToContainer (property_container, tv_test, " test" , Permission::ReadWrite);
@@ -258,7 +258,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
258
258
WHEN (" A DimmedLight property is changed via CBOR message" )
259
259
{
260
260
PropertyContainer property_container;
261
-
261
+
262
262
CloudDimmedLight light_test = CloudDimmedLight (false , 0.0 );
263
263
264
264
addPropertyToContainer (property_container, light_test, " test" , Permission::ReadWrite);
@@ -280,7 +280,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
280
280
WHEN (" A Light property is changed via CBOR message" )
281
281
{
282
282
PropertyContainer property_container;
283
-
283
+
284
284
CloudLight light_test;
285
285
light_test = false ;
286
286
@@ -298,7 +298,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
298
298
WHEN (" A ContactSensor property is changed via CBOR message" )
299
299
{
300
300
PropertyContainer property_container;
301
-
301
+
302
302
CloudContactSensor contact_test;
303
303
contact_test = false ;
304
304
@@ -316,7 +316,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
316
316
WHEN (" A MotionSensor property is changed via CBOR message" )
317
317
{
318
318
PropertyContainer property_container;
319
-
319
+
320
320
CloudMotionSensor motion_test;
321
321
motion_test = false ;
322
322
@@ -334,7 +334,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
334
334
WHEN (" A SmartPlug property is changed via CBOR message" )
335
335
{
336
336
PropertyContainer property_container;
337
-
337
+
338
338
CloudSmartPlug plug_test;
339
339
plug_test = false ;
340
340
@@ -352,7 +352,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
352
352
WHEN (" A Switch property is changed via CBOR message" )
353
353
{
354
354
PropertyContainer property_container;
355
-
355
+
356
356
CloudSwitch switch_test;
357
357
switch_test = false ;
358
358
@@ -370,7 +370,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
370
370
WHEN (" A Temperature property is changed via CBOR message" )
371
371
{
372
372
PropertyContainer property_container;
373
-
373
+
374
374
CloudTemperatureSensor test;
375
375
test = 0 .0f ;
376
376
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
@@ -417,8 +417,8 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
417
417
CBORDecoder::decode (property_container, payload, sizeof (payload) / sizeof (uint8_t ));
418
418
419
419
Schedule schedule_compare = Schedule (1633305600 , 1633651200 , 600 , 1140850708 );
420
- Schedule value_schedule_test = schedule_test.getValue ();
421
-
420
+ Schedule value_schedule_test = schedule_test.getValue ();
421
+
422
422
bool verify = (value_schedule_test == schedule_compare);
423
423
REQUIRE (verify);
424
424
REQUIRE (value_schedule_test.frm == schedule_compare.frm );
@@ -434,7 +434,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
434
434
WHEN (" Multiple properties of different type are changed via CBOR message" )
435
435
{
436
436
PropertyContainer property_container;
437
-
437
+
438
438
CloudBool bool_test = false ;
439
439
CloudInt int_test = 1 ;
440
440
CloudFloat float_test = 2 .0f ;
@@ -463,7 +463,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
463
463
WHEN (" Multiple properties of different type are synchronized via CBOR message. FORCE_CLOUD_SYNC is passed as synchronization function and as a consequence values contained in the incoming message are stored in the properties" )
464
464
{
465
465
PropertyContainer property_container;
466
-
466
+
467
467
CloudBool bool_test = false ;
468
468
CloudInt int_test = 1 ;
469
469
CloudFloat float_test = 2 .0f ;
@@ -492,7 +492,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
492
492
WHEN (" Multiple primitive properties of different type are synchronized via CBOR message. FORCE_CLOUD_SYNC is passed as synchronization function and as a consequence values contained in the incoming message are stored in the properties" )
493
493
{
494
494
PropertyContainer property_container;
495
-
495
+
496
496
int int_test = 1 ;
497
497
bool bool_test = false ;
498
498
float float_test = 2 .0f ;
@@ -528,7 +528,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
528
528
WHEN (" Multiple String properties are changed via CBOR message" )
529
529
{
530
530
PropertyContainer property_container;
531
-
531
+
532
532
CloudString str_1 (" hello" ),
533
533
str_2 (" arduino" ),
534
534
str_3 (" cloud" ),
@@ -557,7 +557,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
557
557
WHEN (" A payload containing a CBOR base name is parsed" )
558
558
{
559
559
PropertyContainer property_container;
560
-
560
+
561
561
CloudString str = " hello" ;
562
562
addPropertyToContainer (property_container, str, " test" , Permission::ReadWrite);
563
563
@@ -573,7 +573,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
573
573
WHEN (" A payload containing a CBOR base time is parsed" )
574
574
{
575
575
PropertyContainer property_container;
576
-
576
+
577
577
CloudInt test = 0 ;
578
578
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
579
579
@@ -589,7 +589,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
589
589
WHEN (" A payload containing a CBOR time is parsed" )
590
590
{
591
591
PropertyContainer property_container;
592
-
592
+
593
593
CloudInt test = 0 ;
594
594
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
595
595
@@ -605,7 +605,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
605
605
WHEN (" A payload containing a CBOR BaseVersion is parsed" )
606
606
{
607
607
PropertyContainer property_container;
608
-
608
+
609
609
CloudInt test = 0 ;
610
610
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
611
611
@@ -621,7 +621,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
621
621
WHEN (" A payload containing a CBOR BaseName, BaseTime and Time is parsed" )
622
622
{
623
623
PropertyContainer property_container;
624
-
624
+
625
625
CloudInt test = 0 ;
626
626
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
627
627
@@ -639,7 +639,7 @@ SCENARIO("Arduino Cloud Properties are decoded", "[ArduinoCloudThing::decode]")
639
639
WHEN (" A payload containing a invalid CBOR key is parsed" )
640
640
{
641
641
PropertyContainer property_container;
642
-
642
+
643
643
CloudInt test = 0 ;
644
644
addPropertyToContainer (property_container, test, " test" , Permission::ReadWrite);
645
645
0 commit comments