@@ -457,9 +457,21 @@ pub mod mod_test {
457
457
458
458
let expect = |mock : & mut MockMyIotHub | {
459
459
mock. expect_twin_report ( )
460
- . with ( eq ( json ! ( { "system_info" : { "version" : 1 , } } ) ) )
460
+ . with ( eq ( json ! ( {
461
+ "device_update_consent" : { "version" : 1 } ,
462
+ "factory_reset" : null,
463
+ "firmware_update" : { "version" : 1 } ,
464
+ "modem_info" : null,
465
+ "network_status" : { "version" : 3 } ,
466
+ "provisioning_config" : { "version" : 1 } ,
467
+ "reboot" : { "version" : 2 } ,
468
+ "ssh_tunnel" : { "version" : 2 } ,
469
+ "system_info" : { "version" : 1 } ,
470
+ "wifi_commissioning" : null,
471
+ } ) ) )
461
472
. times ( 1 )
462
473
. returning ( |_| Ok ( ( ) ) ) ;
474
+
463
475
let s = IotHubClient :: sdk_version_string ( ) ;
464
476
mock. expect_twin_report ( )
465
477
. with ( eq ( json ! ( { "system_info" : {
@@ -474,21 +486,6 @@ pub mod mod_test {
474
486
. times ( 1 )
475
487
. returning ( |_| Ok ( ( ) ) ) ;
476
488
477
- mock. expect_twin_report ( )
478
- . with ( eq ( json ! ( { "factory_reset" : null } ) ) )
479
- . times ( 1 )
480
- . returning ( |_| Ok ( ( ) ) ) ;
481
-
482
- mock. expect_twin_report ( )
483
- . with ( eq ( json ! ( { "ssh_tunnel" : { "version" : 2 } } ) ) )
484
- . times ( 1 )
485
- . returning ( |_| Ok ( ( ) ) ) ;
486
-
487
- mock. expect_twin_report ( )
488
- . with ( eq ( json ! ( { "firmware_update" : { "version" : 1 } } ) ) )
489
- . times ( 1 )
490
- . returning ( |_| Ok ( ( ) ) ) ;
491
-
492
489
mock. expect_twin_report ( )
493
490
. with ( eq ( json ! ( {
494
491
"ssh_tunnel" : {
@@ -498,21 +495,6 @@ pub mod mod_test {
498
495
. times ( 1 )
499
496
. returning ( |_| Ok ( ( ) ) ) ;
500
497
501
- mock. expect_twin_report ( )
502
- . with ( eq ( json ! ( { "device_update_consent" : { "version" : 1 } } ) ) )
503
- . times ( 1 )
504
- . returning ( |_| Ok ( ( ) ) ) ;
505
-
506
- mock. expect_twin_report ( )
507
- . with ( eq ( json ! ( { "modem_info" : null} ) ) )
508
- . times ( 1 )
509
- . returning ( |_| Ok ( ( ) ) ) ;
510
-
511
- mock. expect_twin_report ( )
512
- . with ( eq ( json ! ( { "network_status" : { "version" : 3 } } ) ) )
513
- . times ( 1 )
514
- . returning ( |_| Ok ( ( ) ) ) ;
515
-
516
498
mock. expect_twin_report ( )
517
499
. with ( eq ( json ! ( {
518
500
"network_status" : {
@@ -545,16 +527,6 @@ pub mod mod_test {
545
527
. times ( 1 )
546
528
. returning ( |_| Ok ( ( ) ) ) ;
547
529
548
- mock. expect_twin_report ( )
549
- . with ( eq ( json ! ( { "reboot" : { "version" : 2 } } ) ) )
550
- . times ( 1 )
551
- . returning ( |_| Ok ( ( ) ) ) ;
552
-
553
- mock. expect_twin_report ( )
554
- . with ( eq ( json ! ( { "wifi_commissioning" : null } ) ) )
555
- . times ( 1 )
556
- . returning ( |_| Ok ( ( ) ) ) ;
557
-
558
530
mock. expect_twin_report ( )
559
531
. with ( eq (
560
532
json ! ( { "wait_online_timeout_secs" : { "nanos" : 0 , "secs" : 300 } } ) ,
@@ -579,11 +551,6 @@ pub mod mod_test {
579
551
. times ( 1 )
580
552
. returning ( |_| Ok ( ( ) ) ) ;
581
553
582
- mock. expect_twin_report ( )
583
- . with ( eq ( json ! ( { "provisioning_config" : { "version" : 1 } } ) ) )
584
- . times ( 1 )
585
- . returning ( |_| Ok ( ( ) ) ) ;
586
-
587
554
mock. expect_twin_report ( )
588
555
. with ( eq ( json ! ( {
589
556
"provisioning_config" : {
@@ -632,7 +599,7 @@ pub mod mod_test {
632
599
] ;
633
600
634
601
let expect = |mock : & mut MockMyIotHub | {
635
- mock. expect_twin_report ( ) . times ( 12 ) . returning ( |_| Ok ( ( ) ) ) ;
602
+ mock. expect_twin_report ( ) . times ( 3 ) . returning ( |_| Ok ( ( ) ) ) ;
636
603
} ;
637
604
638
605
let test = |test_attr : & mut TestConfig | {
@@ -656,7 +623,7 @@ pub mod mod_test {
656
623
] ;
657
624
658
625
let expect = |mock : & mut MockMyIotHub | {
659
- mock. expect_twin_report ( ) . times ( 20 ) . returning ( |_| Ok ( ( ) ) ) ;
626
+ mock. expect_twin_report ( ) . times ( 11 ) . returning ( |_| Ok ( ( ) ) ) ;
660
627
661
628
mock. expect_twin_report ( )
662
629
. with ( eq ( json ! ( {
@@ -732,7 +699,7 @@ pub mod mod_test {
732
699
let test_dirs = vec ! [ "testfiles/positive/test_component" ] ;
733
700
734
701
let expect = |mock : & mut MockMyIotHub | {
735
- mock. expect_twin_report ( ) . times ( 20 ) . returning ( |_| Ok ( ( ) ) ) ;
702
+ mock. expect_twin_report ( ) . times ( 11 ) . returning ( |_| Ok ( ( ) ) ) ;
736
703
} ;
737
704
738
705
let test = |test_attr : & mut TestConfig | {
0 commit comments