-
Notifications
You must be signed in to change notification settings - Fork 46
/
certificate_mock.go
1288 lines (1056 loc) · 48.8 KB
/
certificate_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package testutils
// Code generated by http://github.com/gojuno/minimock (dev). DO NOT EDIT.
import (
"crypto"
mm_atomic "sync/atomic"
mm_time "time"
"github.com/gojuno/minimock/v3"
mm_insolar "github.com/insolar/insolar/insolar"
)
// CertificateMock implements insolar.Certificate
type CertificateMock struct {
t minimock.Tester
funcGetDiscoveryNodes func() (da1 []mm_insolar.DiscoveryNode)
inspectFuncGetDiscoveryNodes func()
afterGetDiscoveryNodesCounter uint64
beforeGetDiscoveryNodesCounter uint64
GetDiscoveryNodesMock mCertificateMockGetDiscoveryNodes
funcGetDiscoverySigns func() (m1 map[mm_insolar.Reference][]byte)
inspectFuncGetDiscoverySigns func()
afterGetDiscoverySignsCounter uint64
beforeGetDiscoverySignsCounter uint64
GetDiscoverySignsMock mCertificateMockGetDiscoverySigns
funcGetMajorityRule func() (i1 int)
inspectFuncGetMajorityRule func()
afterGetMajorityRuleCounter uint64
beforeGetMajorityRuleCounter uint64
GetMajorityRuleMock mCertificateMockGetMajorityRule
funcGetMinRoles func() (virtual uint, heavyMaterial uint, lightMaterial uint)
inspectFuncGetMinRoles func()
afterGetMinRolesCounter uint64
beforeGetMinRolesCounter uint64
GetMinRolesMock mCertificateMockGetMinRoles
funcGetNodeRef func() (rp1 *mm_insolar.Reference)
inspectFuncGetNodeRef func()
afterGetNodeRefCounter uint64
beforeGetNodeRefCounter uint64
GetNodeRefMock mCertificateMockGetNodeRef
funcGetPublicKey func() (p1 crypto.PublicKey)
inspectFuncGetPublicKey func()
afterGetPublicKeyCounter uint64
beforeGetPublicKeyCounter uint64
GetPublicKeyMock mCertificateMockGetPublicKey
funcGetRole func() (s1 mm_insolar.StaticRole)
inspectFuncGetRole func()
afterGetRoleCounter uint64
beforeGetRoleCounter uint64
GetRoleMock mCertificateMockGetRole
funcSerializeNodePart func() (ba1 []byte)
inspectFuncSerializeNodePart func()
afterSerializeNodePartCounter uint64
beforeSerializeNodePartCounter uint64
SerializeNodePartMock mCertificateMockSerializeNodePart
}
// NewCertificateMock returns a mock for insolar.Certificate
func NewCertificateMock(t minimock.Tester) *CertificateMock {
m := &CertificateMock{t: t}
if controller, ok := t.(minimock.MockController); ok {
controller.RegisterMocker(m)
}
m.GetDiscoveryNodesMock = mCertificateMockGetDiscoveryNodes{mock: m}
m.GetDiscoverySignsMock = mCertificateMockGetDiscoverySigns{mock: m}
m.GetMajorityRuleMock = mCertificateMockGetMajorityRule{mock: m}
m.GetMinRolesMock = mCertificateMockGetMinRoles{mock: m}
m.GetNodeRefMock = mCertificateMockGetNodeRef{mock: m}
m.GetPublicKeyMock = mCertificateMockGetPublicKey{mock: m}
m.GetRoleMock = mCertificateMockGetRole{mock: m}
m.SerializeNodePartMock = mCertificateMockSerializeNodePart{mock: m}
return m
}
type mCertificateMockGetDiscoveryNodes struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetDiscoveryNodesExpectation
expectations []*CertificateMockGetDiscoveryNodesExpectation
}
// CertificateMockGetDiscoveryNodesExpectation specifies expectation struct of the Certificate.GetDiscoveryNodes
type CertificateMockGetDiscoveryNodesExpectation struct {
mock *CertificateMock
results *CertificateMockGetDiscoveryNodesResults
Counter uint64
}
// CertificateMockGetDiscoveryNodesResults contains results of the Certificate.GetDiscoveryNodes
type CertificateMockGetDiscoveryNodesResults struct {
da1 []mm_insolar.DiscoveryNode
}
// Expect sets up expected params for Certificate.GetDiscoveryNodes
func (mmGetDiscoveryNodes *mCertificateMockGetDiscoveryNodes) Expect() *mCertificateMockGetDiscoveryNodes {
if mmGetDiscoveryNodes.mock.funcGetDiscoveryNodes != nil {
mmGetDiscoveryNodes.mock.t.Fatalf("CertificateMock.GetDiscoveryNodes mock is already set by Set")
}
if mmGetDiscoveryNodes.defaultExpectation == nil {
mmGetDiscoveryNodes.defaultExpectation = &CertificateMockGetDiscoveryNodesExpectation{}
}
return mmGetDiscoveryNodes
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetDiscoveryNodes
func (mmGetDiscoveryNodes *mCertificateMockGetDiscoveryNodes) Inspect(f func()) *mCertificateMockGetDiscoveryNodes {
if mmGetDiscoveryNodes.mock.inspectFuncGetDiscoveryNodes != nil {
mmGetDiscoveryNodes.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetDiscoveryNodes")
}
mmGetDiscoveryNodes.mock.inspectFuncGetDiscoveryNodes = f
return mmGetDiscoveryNodes
}
// Return sets up results that will be returned by Certificate.GetDiscoveryNodes
func (mmGetDiscoveryNodes *mCertificateMockGetDiscoveryNodes) Return(da1 []mm_insolar.DiscoveryNode) *CertificateMock {
if mmGetDiscoveryNodes.mock.funcGetDiscoveryNodes != nil {
mmGetDiscoveryNodes.mock.t.Fatalf("CertificateMock.GetDiscoveryNodes mock is already set by Set")
}
if mmGetDiscoveryNodes.defaultExpectation == nil {
mmGetDiscoveryNodes.defaultExpectation = &CertificateMockGetDiscoveryNodesExpectation{mock: mmGetDiscoveryNodes.mock}
}
mmGetDiscoveryNodes.defaultExpectation.results = &CertificateMockGetDiscoveryNodesResults{da1}
return mmGetDiscoveryNodes.mock
}
//Set uses given function f to mock the Certificate.GetDiscoveryNodes method
func (mmGetDiscoveryNodes *mCertificateMockGetDiscoveryNodes) Set(f func() (da1 []mm_insolar.DiscoveryNode)) *CertificateMock {
if mmGetDiscoveryNodes.defaultExpectation != nil {
mmGetDiscoveryNodes.mock.t.Fatalf("Default expectation is already set for the Certificate.GetDiscoveryNodes method")
}
if len(mmGetDiscoveryNodes.expectations) > 0 {
mmGetDiscoveryNodes.mock.t.Fatalf("Some expectations are already set for the Certificate.GetDiscoveryNodes method")
}
mmGetDiscoveryNodes.mock.funcGetDiscoveryNodes = f
return mmGetDiscoveryNodes.mock
}
// GetDiscoveryNodes implements insolar.Certificate
func (mmGetDiscoveryNodes *CertificateMock) GetDiscoveryNodes() (da1 []mm_insolar.DiscoveryNode) {
mm_atomic.AddUint64(&mmGetDiscoveryNodes.beforeGetDiscoveryNodesCounter, 1)
defer mm_atomic.AddUint64(&mmGetDiscoveryNodes.afterGetDiscoveryNodesCounter, 1)
if mmGetDiscoveryNodes.inspectFuncGetDiscoveryNodes != nil {
mmGetDiscoveryNodes.inspectFuncGetDiscoveryNodes()
}
if mmGetDiscoveryNodes.GetDiscoveryNodesMock.defaultExpectation != nil {
mm_atomic.AddUint64(&mmGetDiscoveryNodes.GetDiscoveryNodesMock.defaultExpectation.Counter, 1)
mm_results := mmGetDiscoveryNodes.GetDiscoveryNodesMock.defaultExpectation.results
if mm_results == nil {
mmGetDiscoveryNodes.t.Fatal("No results are set for the CertificateMock.GetDiscoveryNodes")
}
return (*mm_results).da1
}
if mmGetDiscoveryNodes.funcGetDiscoveryNodes != nil {
return mmGetDiscoveryNodes.funcGetDiscoveryNodes()
}
mmGetDiscoveryNodes.t.Fatalf("Unexpected call to CertificateMock.GetDiscoveryNodes.")
return
}
// GetDiscoveryNodesAfterCounter returns a count of finished CertificateMock.GetDiscoveryNodes invocations
func (mmGetDiscoveryNodes *CertificateMock) GetDiscoveryNodesAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetDiscoveryNodes.afterGetDiscoveryNodesCounter)
}
// GetDiscoveryNodesBeforeCounter returns a count of CertificateMock.GetDiscoveryNodes invocations
func (mmGetDiscoveryNodes *CertificateMock) GetDiscoveryNodesBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetDiscoveryNodes.beforeGetDiscoveryNodesCounter)
}
// MinimockGetDiscoveryNodesDone returns true if the count of the GetDiscoveryNodes invocations corresponds
// the number of defined expectations
func (m *CertificateMock) MinimockGetDiscoveryNodesDone() bool {
for _, e := range m.GetDiscoveryNodesMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetDiscoveryNodesMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetDiscoveryNodesCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcGetDiscoveryNodes != nil && mm_atomic.LoadUint64(&m.afterGetDiscoveryNodesCounter) < 1 {
return false
}
return true
}
// MinimockGetDiscoveryNodesInspect logs each unmet expectation
func (m *CertificateMock) MinimockGetDiscoveryNodesInspect() {
for _, e := range m.GetDiscoveryNodesMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
m.t.Error("Expected call to CertificateMock.GetDiscoveryNodes")
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetDiscoveryNodesMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetDiscoveryNodesCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetDiscoveryNodes")
}
// if func was set then invocations count should be greater than zero
if m.funcGetDiscoveryNodes != nil && mm_atomic.LoadUint64(&m.afterGetDiscoveryNodesCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetDiscoveryNodes")
}
}
type mCertificateMockGetDiscoverySigns struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetDiscoverySignsExpectation
expectations []*CertificateMockGetDiscoverySignsExpectation
}
// CertificateMockGetDiscoverySignsExpectation specifies expectation struct of the Certificate.GetDiscoverySigns
type CertificateMockGetDiscoverySignsExpectation struct {
mock *CertificateMock
results *CertificateMockGetDiscoverySignsResults
Counter uint64
}
// CertificateMockGetDiscoverySignsResults contains results of the Certificate.GetDiscoverySigns
type CertificateMockGetDiscoverySignsResults struct {
m1 map[mm_insolar.Reference][]byte
}
// Expect sets up expected params for Certificate.GetDiscoverySigns
func (mmGetDiscoverySigns *mCertificateMockGetDiscoverySigns) Expect() *mCertificateMockGetDiscoverySigns {
if mmGetDiscoverySigns.mock.funcGetDiscoverySigns != nil {
mmGetDiscoverySigns.mock.t.Fatalf("CertificateMock.GetDiscoverySigns mock is already set by Set")
}
if mmGetDiscoverySigns.defaultExpectation == nil {
mmGetDiscoverySigns.defaultExpectation = &CertificateMockGetDiscoverySignsExpectation{}
}
return mmGetDiscoverySigns
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetDiscoverySigns
func (mmGetDiscoverySigns *mCertificateMockGetDiscoverySigns) Inspect(f func()) *mCertificateMockGetDiscoverySigns {
if mmGetDiscoverySigns.mock.inspectFuncGetDiscoverySigns != nil {
mmGetDiscoverySigns.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetDiscoverySigns")
}
mmGetDiscoverySigns.mock.inspectFuncGetDiscoverySigns = f
return mmGetDiscoverySigns
}
// Return sets up results that will be returned by Certificate.GetDiscoverySigns
func (mmGetDiscoverySigns *mCertificateMockGetDiscoverySigns) Return(m1 map[mm_insolar.Reference][]byte) *CertificateMock {
if mmGetDiscoverySigns.mock.funcGetDiscoverySigns != nil {
mmGetDiscoverySigns.mock.t.Fatalf("CertificateMock.GetDiscoverySigns mock is already set by Set")
}
if mmGetDiscoverySigns.defaultExpectation == nil {
mmGetDiscoverySigns.defaultExpectation = &CertificateMockGetDiscoverySignsExpectation{mock: mmGetDiscoverySigns.mock}
}
mmGetDiscoverySigns.defaultExpectation.results = &CertificateMockGetDiscoverySignsResults{m1}
return mmGetDiscoverySigns.mock
}
//Set uses given function f to mock the Certificate.GetDiscoverySigns method
func (mmGetDiscoverySigns *mCertificateMockGetDiscoverySigns) Set(f func() (m1 map[mm_insolar.Reference][]byte)) *CertificateMock {
if mmGetDiscoverySigns.defaultExpectation != nil {
mmGetDiscoverySigns.mock.t.Fatalf("Default expectation is already set for the Certificate.GetDiscoverySigns method")
}
if len(mmGetDiscoverySigns.expectations) > 0 {
mmGetDiscoverySigns.mock.t.Fatalf("Some expectations are already set for the Certificate.GetDiscoverySigns method")
}
mmGetDiscoverySigns.mock.funcGetDiscoverySigns = f
return mmGetDiscoverySigns.mock
}
// GetDiscoverySigns implements insolar.Certificate
func (mmGetDiscoverySigns *CertificateMock) GetDiscoverySigns() (m1 map[mm_insolar.Reference][]byte) {
mm_atomic.AddUint64(&mmGetDiscoverySigns.beforeGetDiscoverySignsCounter, 1)
defer mm_atomic.AddUint64(&mmGetDiscoverySigns.afterGetDiscoverySignsCounter, 1)
if mmGetDiscoverySigns.inspectFuncGetDiscoverySigns != nil {
mmGetDiscoverySigns.inspectFuncGetDiscoverySigns()
}
if mmGetDiscoverySigns.GetDiscoverySignsMock.defaultExpectation != nil {
mm_atomic.AddUint64(&mmGetDiscoverySigns.GetDiscoverySignsMock.defaultExpectation.Counter, 1)
mm_results := mmGetDiscoverySigns.GetDiscoverySignsMock.defaultExpectation.results
if mm_results == nil {
mmGetDiscoverySigns.t.Fatal("No results are set for the CertificateMock.GetDiscoverySigns")
}
return (*mm_results).m1
}
if mmGetDiscoverySigns.funcGetDiscoverySigns != nil {
return mmGetDiscoverySigns.funcGetDiscoverySigns()
}
mmGetDiscoverySigns.t.Fatalf("Unexpected call to CertificateMock.GetDiscoverySigns.")
return
}
// GetDiscoverySignsAfterCounter returns a count of finished CertificateMock.GetDiscoverySigns invocations
func (mmGetDiscoverySigns *CertificateMock) GetDiscoverySignsAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetDiscoverySigns.afterGetDiscoverySignsCounter)
}
// GetDiscoverySignsBeforeCounter returns a count of CertificateMock.GetDiscoverySigns invocations
func (mmGetDiscoverySigns *CertificateMock) GetDiscoverySignsBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetDiscoverySigns.beforeGetDiscoverySignsCounter)
}
// MinimockGetDiscoverySignsDone returns true if the count of the GetDiscoverySigns invocations corresponds
// the number of defined expectations
func (m *CertificateMock) MinimockGetDiscoverySignsDone() bool {
for _, e := range m.GetDiscoverySignsMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetDiscoverySignsMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetDiscoverySignsCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcGetDiscoverySigns != nil && mm_atomic.LoadUint64(&m.afterGetDiscoverySignsCounter) < 1 {
return false
}
return true
}
// MinimockGetDiscoverySignsInspect logs each unmet expectation
func (m *CertificateMock) MinimockGetDiscoverySignsInspect() {
for _, e := range m.GetDiscoverySignsMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
m.t.Error("Expected call to CertificateMock.GetDiscoverySigns")
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetDiscoverySignsMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetDiscoverySignsCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetDiscoverySigns")
}
// if func was set then invocations count should be greater than zero
if m.funcGetDiscoverySigns != nil && mm_atomic.LoadUint64(&m.afterGetDiscoverySignsCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetDiscoverySigns")
}
}
type mCertificateMockGetMajorityRule struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetMajorityRuleExpectation
expectations []*CertificateMockGetMajorityRuleExpectation
}
// CertificateMockGetMajorityRuleExpectation specifies expectation struct of the Certificate.GetMajorityRule
type CertificateMockGetMajorityRuleExpectation struct {
mock *CertificateMock
results *CertificateMockGetMajorityRuleResults
Counter uint64
}
// CertificateMockGetMajorityRuleResults contains results of the Certificate.GetMajorityRule
type CertificateMockGetMajorityRuleResults struct {
i1 int
}
// Expect sets up expected params for Certificate.GetMajorityRule
func (mmGetMajorityRule *mCertificateMockGetMajorityRule) Expect() *mCertificateMockGetMajorityRule {
if mmGetMajorityRule.mock.funcGetMajorityRule != nil {
mmGetMajorityRule.mock.t.Fatalf("CertificateMock.GetMajorityRule mock is already set by Set")
}
if mmGetMajorityRule.defaultExpectation == nil {
mmGetMajorityRule.defaultExpectation = &CertificateMockGetMajorityRuleExpectation{}
}
return mmGetMajorityRule
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetMajorityRule
func (mmGetMajorityRule *mCertificateMockGetMajorityRule) Inspect(f func()) *mCertificateMockGetMajorityRule {
if mmGetMajorityRule.mock.inspectFuncGetMajorityRule != nil {
mmGetMajorityRule.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetMajorityRule")
}
mmGetMajorityRule.mock.inspectFuncGetMajorityRule = f
return mmGetMajorityRule
}
// Return sets up results that will be returned by Certificate.GetMajorityRule
func (mmGetMajorityRule *mCertificateMockGetMajorityRule) Return(i1 int) *CertificateMock {
if mmGetMajorityRule.mock.funcGetMajorityRule != nil {
mmGetMajorityRule.mock.t.Fatalf("CertificateMock.GetMajorityRule mock is already set by Set")
}
if mmGetMajorityRule.defaultExpectation == nil {
mmGetMajorityRule.defaultExpectation = &CertificateMockGetMajorityRuleExpectation{mock: mmGetMajorityRule.mock}
}
mmGetMajorityRule.defaultExpectation.results = &CertificateMockGetMajorityRuleResults{i1}
return mmGetMajorityRule.mock
}
//Set uses given function f to mock the Certificate.GetMajorityRule method
func (mmGetMajorityRule *mCertificateMockGetMajorityRule) Set(f func() (i1 int)) *CertificateMock {
if mmGetMajorityRule.defaultExpectation != nil {
mmGetMajorityRule.mock.t.Fatalf("Default expectation is already set for the Certificate.GetMajorityRule method")
}
if len(mmGetMajorityRule.expectations) > 0 {
mmGetMajorityRule.mock.t.Fatalf("Some expectations are already set for the Certificate.GetMajorityRule method")
}
mmGetMajorityRule.mock.funcGetMajorityRule = f
return mmGetMajorityRule.mock
}
// GetMajorityRule implements insolar.Certificate
func (mmGetMajorityRule *CertificateMock) GetMajorityRule() (i1 int) {
mm_atomic.AddUint64(&mmGetMajorityRule.beforeGetMajorityRuleCounter, 1)
defer mm_atomic.AddUint64(&mmGetMajorityRule.afterGetMajorityRuleCounter, 1)
if mmGetMajorityRule.inspectFuncGetMajorityRule != nil {
mmGetMajorityRule.inspectFuncGetMajorityRule()
}
if mmGetMajorityRule.GetMajorityRuleMock.defaultExpectation != nil {
mm_atomic.AddUint64(&mmGetMajorityRule.GetMajorityRuleMock.defaultExpectation.Counter, 1)
mm_results := mmGetMajorityRule.GetMajorityRuleMock.defaultExpectation.results
if mm_results == nil {
mmGetMajorityRule.t.Fatal("No results are set for the CertificateMock.GetMajorityRule")
}
return (*mm_results).i1
}
if mmGetMajorityRule.funcGetMajorityRule != nil {
return mmGetMajorityRule.funcGetMajorityRule()
}
mmGetMajorityRule.t.Fatalf("Unexpected call to CertificateMock.GetMajorityRule.")
return
}
// GetMajorityRuleAfterCounter returns a count of finished CertificateMock.GetMajorityRule invocations
func (mmGetMajorityRule *CertificateMock) GetMajorityRuleAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetMajorityRule.afterGetMajorityRuleCounter)
}
// GetMajorityRuleBeforeCounter returns a count of CertificateMock.GetMajorityRule invocations
func (mmGetMajorityRule *CertificateMock) GetMajorityRuleBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetMajorityRule.beforeGetMajorityRuleCounter)
}
// MinimockGetMajorityRuleDone returns true if the count of the GetMajorityRule invocations corresponds
// the number of defined expectations
func (m *CertificateMock) MinimockGetMajorityRuleDone() bool {
for _, e := range m.GetMajorityRuleMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetMajorityRuleMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetMajorityRuleCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcGetMajorityRule != nil && mm_atomic.LoadUint64(&m.afterGetMajorityRuleCounter) < 1 {
return false
}
return true
}
// MinimockGetMajorityRuleInspect logs each unmet expectation
func (m *CertificateMock) MinimockGetMajorityRuleInspect() {
for _, e := range m.GetMajorityRuleMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
m.t.Error("Expected call to CertificateMock.GetMajorityRule")
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetMajorityRuleMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetMajorityRuleCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetMajorityRule")
}
// if func was set then invocations count should be greater than zero
if m.funcGetMajorityRule != nil && mm_atomic.LoadUint64(&m.afterGetMajorityRuleCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetMajorityRule")
}
}
type mCertificateMockGetMinRoles struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetMinRolesExpectation
expectations []*CertificateMockGetMinRolesExpectation
}
// CertificateMockGetMinRolesExpectation specifies expectation struct of the Certificate.GetMinRoles
type CertificateMockGetMinRolesExpectation struct {
mock *CertificateMock
results *CertificateMockGetMinRolesResults
Counter uint64
}
// CertificateMockGetMinRolesResults contains results of the Certificate.GetMinRoles
type CertificateMockGetMinRolesResults struct {
virtual uint
heavyMaterial uint
lightMaterial uint
}
// Expect sets up expected params for Certificate.GetMinRoles
func (mmGetMinRoles *mCertificateMockGetMinRoles) Expect() *mCertificateMockGetMinRoles {
if mmGetMinRoles.mock.funcGetMinRoles != nil {
mmGetMinRoles.mock.t.Fatalf("CertificateMock.GetMinRoles mock is already set by Set")
}
if mmGetMinRoles.defaultExpectation == nil {
mmGetMinRoles.defaultExpectation = &CertificateMockGetMinRolesExpectation{}
}
return mmGetMinRoles
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetMinRoles
func (mmGetMinRoles *mCertificateMockGetMinRoles) Inspect(f func()) *mCertificateMockGetMinRoles {
if mmGetMinRoles.mock.inspectFuncGetMinRoles != nil {
mmGetMinRoles.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetMinRoles")
}
mmGetMinRoles.mock.inspectFuncGetMinRoles = f
return mmGetMinRoles
}
// Return sets up results that will be returned by Certificate.GetMinRoles
func (mmGetMinRoles *mCertificateMockGetMinRoles) Return(virtual uint, heavyMaterial uint, lightMaterial uint) *CertificateMock {
if mmGetMinRoles.mock.funcGetMinRoles != nil {
mmGetMinRoles.mock.t.Fatalf("CertificateMock.GetMinRoles mock is already set by Set")
}
if mmGetMinRoles.defaultExpectation == nil {
mmGetMinRoles.defaultExpectation = &CertificateMockGetMinRolesExpectation{mock: mmGetMinRoles.mock}
}
mmGetMinRoles.defaultExpectation.results = &CertificateMockGetMinRolesResults{virtual, heavyMaterial, lightMaterial}
return mmGetMinRoles.mock
}
//Set uses given function f to mock the Certificate.GetMinRoles method
func (mmGetMinRoles *mCertificateMockGetMinRoles) Set(f func() (virtual uint, heavyMaterial uint, lightMaterial uint)) *CertificateMock {
if mmGetMinRoles.defaultExpectation != nil {
mmGetMinRoles.mock.t.Fatalf("Default expectation is already set for the Certificate.GetMinRoles method")
}
if len(mmGetMinRoles.expectations) > 0 {
mmGetMinRoles.mock.t.Fatalf("Some expectations are already set for the Certificate.GetMinRoles method")
}
mmGetMinRoles.mock.funcGetMinRoles = f
return mmGetMinRoles.mock
}
// GetMinRoles implements insolar.Certificate
func (mmGetMinRoles *CertificateMock) GetMinRoles() (virtual uint, heavyMaterial uint, lightMaterial uint) {
mm_atomic.AddUint64(&mmGetMinRoles.beforeGetMinRolesCounter, 1)
defer mm_atomic.AddUint64(&mmGetMinRoles.afterGetMinRolesCounter, 1)
if mmGetMinRoles.inspectFuncGetMinRoles != nil {
mmGetMinRoles.inspectFuncGetMinRoles()
}
if mmGetMinRoles.GetMinRolesMock.defaultExpectation != nil {
mm_atomic.AddUint64(&mmGetMinRoles.GetMinRolesMock.defaultExpectation.Counter, 1)
mm_results := mmGetMinRoles.GetMinRolesMock.defaultExpectation.results
if mm_results == nil {
mmGetMinRoles.t.Fatal("No results are set for the CertificateMock.GetMinRoles")
}
return (*mm_results).virtual, (*mm_results).heavyMaterial, (*mm_results).lightMaterial
}
if mmGetMinRoles.funcGetMinRoles != nil {
return mmGetMinRoles.funcGetMinRoles()
}
mmGetMinRoles.t.Fatalf("Unexpected call to CertificateMock.GetMinRoles.")
return
}
// GetMinRolesAfterCounter returns a count of finished CertificateMock.GetMinRoles invocations
func (mmGetMinRoles *CertificateMock) GetMinRolesAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetMinRoles.afterGetMinRolesCounter)
}
// GetMinRolesBeforeCounter returns a count of CertificateMock.GetMinRoles invocations
func (mmGetMinRoles *CertificateMock) GetMinRolesBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetMinRoles.beforeGetMinRolesCounter)
}
// MinimockGetMinRolesDone returns true if the count of the GetMinRoles invocations corresponds
// the number of defined expectations
func (m *CertificateMock) MinimockGetMinRolesDone() bool {
for _, e := range m.GetMinRolesMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetMinRolesMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetMinRolesCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcGetMinRoles != nil && mm_atomic.LoadUint64(&m.afterGetMinRolesCounter) < 1 {
return false
}
return true
}
// MinimockGetMinRolesInspect logs each unmet expectation
func (m *CertificateMock) MinimockGetMinRolesInspect() {
for _, e := range m.GetMinRolesMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
m.t.Error("Expected call to CertificateMock.GetMinRoles")
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetMinRolesMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetMinRolesCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetMinRoles")
}
// if func was set then invocations count should be greater than zero
if m.funcGetMinRoles != nil && mm_atomic.LoadUint64(&m.afterGetMinRolesCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetMinRoles")
}
}
type mCertificateMockGetNodeRef struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetNodeRefExpectation
expectations []*CertificateMockGetNodeRefExpectation
}
// CertificateMockGetNodeRefExpectation specifies expectation struct of the Certificate.GetNodeRef
type CertificateMockGetNodeRefExpectation struct {
mock *CertificateMock
results *CertificateMockGetNodeRefResults
Counter uint64
}
// CertificateMockGetNodeRefResults contains results of the Certificate.GetNodeRef
type CertificateMockGetNodeRefResults struct {
rp1 *mm_insolar.Reference
}
// Expect sets up expected params for Certificate.GetNodeRef
func (mmGetNodeRef *mCertificateMockGetNodeRef) Expect() *mCertificateMockGetNodeRef {
if mmGetNodeRef.mock.funcGetNodeRef != nil {
mmGetNodeRef.mock.t.Fatalf("CertificateMock.GetNodeRef mock is already set by Set")
}
if mmGetNodeRef.defaultExpectation == nil {
mmGetNodeRef.defaultExpectation = &CertificateMockGetNodeRefExpectation{}
}
return mmGetNodeRef
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetNodeRef
func (mmGetNodeRef *mCertificateMockGetNodeRef) Inspect(f func()) *mCertificateMockGetNodeRef {
if mmGetNodeRef.mock.inspectFuncGetNodeRef != nil {
mmGetNodeRef.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetNodeRef")
}
mmGetNodeRef.mock.inspectFuncGetNodeRef = f
return mmGetNodeRef
}
// Return sets up results that will be returned by Certificate.GetNodeRef
func (mmGetNodeRef *mCertificateMockGetNodeRef) Return(rp1 *mm_insolar.Reference) *CertificateMock {
if mmGetNodeRef.mock.funcGetNodeRef != nil {
mmGetNodeRef.mock.t.Fatalf("CertificateMock.GetNodeRef mock is already set by Set")
}
if mmGetNodeRef.defaultExpectation == nil {
mmGetNodeRef.defaultExpectation = &CertificateMockGetNodeRefExpectation{mock: mmGetNodeRef.mock}
}
mmGetNodeRef.defaultExpectation.results = &CertificateMockGetNodeRefResults{rp1}
return mmGetNodeRef.mock
}
//Set uses given function f to mock the Certificate.GetNodeRef method
func (mmGetNodeRef *mCertificateMockGetNodeRef) Set(f func() (rp1 *mm_insolar.Reference)) *CertificateMock {
if mmGetNodeRef.defaultExpectation != nil {
mmGetNodeRef.mock.t.Fatalf("Default expectation is already set for the Certificate.GetNodeRef method")
}
if len(mmGetNodeRef.expectations) > 0 {
mmGetNodeRef.mock.t.Fatalf("Some expectations are already set for the Certificate.GetNodeRef method")
}
mmGetNodeRef.mock.funcGetNodeRef = f
return mmGetNodeRef.mock
}
// GetNodeRef implements insolar.Certificate
func (mmGetNodeRef *CertificateMock) GetNodeRef() (rp1 *mm_insolar.Reference) {
mm_atomic.AddUint64(&mmGetNodeRef.beforeGetNodeRefCounter, 1)
defer mm_atomic.AddUint64(&mmGetNodeRef.afterGetNodeRefCounter, 1)
if mmGetNodeRef.inspectFuncGetNodeRef != nil {
mmGetNodeRef.inspectFuncGetNodeRef()
}
if mmGetNodeRef.GetNodeRefMock.defaultExpectation != nil {
mm_atomic.AddUint64(&mmGetNodeRef.GetNodeRefMock.defaultExpectation.Counter, 1)
mm_results := mmGetNodeRef.GetNodeRefMock.defaultExpectation.results
if mm_results == nil {
mmGetNodeRef.t.Fatal("No results are set for the CertificateMock.GetNodeRef")
}
return (*mm_results).rp1
}
if mmGetNodeRef.funcGetNodeRef != nil {
return mmGetNodeRef.funcGetNodeRef()
}
mmGetNodeRef.t.Fatalf("Unexpected call to CertificateMock.GetNodeRef.")
return
}
// GetNodeRefAfterCounter returns a count of finished CertificateMock.GetNodeRef invocations
func (mmGetNodeRef *CertificateMock) GetNodeRefAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetNodeRef.afterGetNodeRefCounter)
}
// GetNodeRefBeforeCounter returns a count of CertificateMock.GetNodeRef invocations
func (mmGetNodeRef *CertificateMock) GetNodeRefBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetNodeRef.beforeGetNodeRefCounter)
}
// MinimockGetNodeRefDone returns true if the count of the GetNodeRef invocations corresponds
// the number of defined expectations
func (m *CertificateMock) MinimockGetNodeRefDone() bool {
for _, e := range m.GetNodeRefMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetNodeRefMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetNodeRefCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcGetNodeRef != nil && mm_atomic.LoadUint64(&m.afterGetNodeRefCounter) < 1 {
return false
}
return true
}
// MinimockGetNodeRefInspect logs each unmet expectation
func (m *CertificateMock) MinimockGetNodeRefInspect() {
for _, e := range m.GetNodeRefMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
m.t.Error("Expected call to CertificateMock.GetNodeRef")
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetNodeRefMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetNodeRefCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetNodeRef")
}
// if func was set then invocations count should be greater than zero
if m.funcGetNodeRef != nil && mm_atomic.LoadUint64(&m.afterGetNodeRefCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetNodeRef")
}
}
type mCertificateMockGetPublicKey struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetPublicKeyExpectation
expectations []*CertificateMockGetPublicKeyExpectation
}
// CertificateMockGetPublicKeyExpectation specifies expectation struct of the Certificate.GetPublicKey
type CertificateMockGetPublicKeyExpectation struct {
mock *CertificateMock
results *CertificateMockGetPublicKeyResults
Counter uint64
}
// CertificateMockGetPublicKeyResults contains results of the Certificate.GetPublicKey
type CertificateMockGetPublicKeyResults struct {
p1 crypto.PublicKey
}
// Expect sets up expected params for Certificate.GetPublicKey
func (mmGetPublicKey *mCertificateMockGetPublicKey) Expect() *mCertificateMockGetPublicKey {
if mmGetPublicKey.mock.funcGetPublicKey != nil {
mmGetPublicKey.mock.t.Fatalf("CertificateMock.GetPublicKey mock is already set by Set")
}
if mmGetPublicKey.defaultExpectation == nil {
mmGetPublicKey.defaultExpectation = &CertificateMockGetPublicKeyExpectation{}
}
return mmGetPublicKey
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetPublicKey
func (mmGetPublicKey *mCertificateMockGetPublicKey) Inspect(f func()) *mCertificateMockGetPublicKey {
if mmGetPublicKey.mock.inspectFuncGetPublicKey != nil {
mmGetPublicKey.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetPublicKey")
}
mmGetPublicKey.mock.inspectFuncGetPublicKey = f
return mmGetPublicKey
}
// Return sets up results that will be returned by Certificate.GetPublicKey
func (mmGetPublicKey *mCertificateMockGetPublicKey) Return(p1 crypto.PublicKey) *CertificateMock {
if mmGetPublicKey.mock.funcGetPublicKey != nil {
mmGetPublicKey.mock.t.Fatalf("CertificateMock.GetPublicKey mock is already set by Set")
}
if mmGetPublicKey.defaultExpectation == nil {
mmGetPublicKey.defaultExpectation = &CertificateMockGetPublicKeyExpectation{mock: mmGetPublicKey.mock}
}
mmGetPublicKey.defaultExpectation.results = &CertificateMockGetPublicKeyResults{p1}
return mmGetPublicKey.mock
}
//Set uses given function f to mock the Certificate.GetPublicKey method
func (mmGetPublicKey *mCertificateMockGetPublicKey) Set(f func() (p1 crypto.PublicKey)) *CertificateMock {
if mmGetPublicKey.defaultExpectation != nil {
mmGetPublicKey.mock.t.Fatalf("Default expectation is already set for the Certificate.GetPublicKey method")
}
if len(mmGetPublicKey.expectations) > 0 {
mmGetPublicKey.mock.t.Fatalf("Some expectations are already set for the Certificate.GetPublicKey method")
}
mmGetPublicKey.mock.funcGetPublicKey = f
return mmGetPublicKey.mock
}
// GetPublicKey implements insolar.Certificate
func (mmGetPublicKey *CertificateMock) GetPublicKey() (p1 crypto.PublicKey) {
mm_atomic.AddUint64(&mmGetPublicKey.beforeGetPublicKeyCounter, 1)
defer mm_atomic.AddUint64(&mmGetPublicKey.afterGetPublicKeyCounter, 1)
if mmGetPublicKey.inspectFuncGetPublicKey != nil {
mmGetPublicKey.inspectFuncGetPublicKey()
}
if mmGetPublicKey.GetPublicKeyMock.defaultExpectation != nil {
mm_atomic.AddUint64(&mmGetPublicKey.GetPublicKeyMock.defaultExpectation.Counter, 1)
mm_results := mmGetPublicKey.GetPublicKeyMock.defaultExpectation.results
if mm_results == nil {
mmGetPublicKey.t.Fatal("No results are set for the CertificateMock.GetPublicKey")
}
return (*mm_results).p1
}
if mmGetPublicKey.funcGetPublicKey != nil {
return mmGetPublicKey.funcGetPublicKey()
}
mmGetPublicKey.t.Fatalf("Unexpected call to CertificateMock.GetPublicKey.")
return
}
// GetPublicKeyAfterCounter returns a count of finished CertificateMock.GetPublicKey invocations
func (mmGetPublicKey *CertificateMock) GetPublicKeyAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetPublicKey.afterGetPublicKeyCounter)
}
// GetPublicKeyBeforeCounter returns a count of CertificateMock.GetPublicKey invocations
func (mmGetPublicKey *CertificateMock) GetPublicKeyBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmGetPublicKey.beforeGetPublicKeyCounter)
}
// MinimockGetPublicKeyDone returns true if the count of the GetPublicKey invocations corresponds
// the number of defined expectations
func (m *CertificateMock) MinimockGetPublicKeyDone() bool {
for _, e := range m.GetPublicKeyMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetPublicKeyMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetPublicKeyCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcGetPublicKey != nil && mm_atomic.LoadUint64(&m.afterGetPublicKeyCounter) < 1 {
return false
}
return true
}
// MinimockGetPublicKeyInspect logs each unmet expectation
func (m *CertificateMock) MinimockGetPublicKeyInspect() {
for _, e := range m.GetPublicKeyMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
m.t.Error("Expected call to CertificateMock.GetPublicKey")
}
}
// if default expectation was set then invocations count should be greater than zero
if m.GetPublicKeyMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterGetPublicKeyCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetPublicKey")
}
// if func was set then invocations count should be greater than zero
if m.funcGetPublicKey != nil && mm_atomic.LoadUint64(&m.afterGetPublicKeyCounter) < 1 {
m.t.Error("Expected call to CertificateMock.GetPublicKey")
}
}
type mCertificateMockGetRole struct {
mock *CertificateMock
defaultExpectation *CertificateMockGetRoleExpectation
expectations []*CertificateMockGetRoleExpectation
}
// CertificateMockGetRoleExpectation specifies expectation struct of the Certificate.GetRole
type CertificateMockGetRoleExpectation struct {
mock *CertificateMock
results *CertificateMockGetRoleResults
Counter uint64
}
// CertificateMockGetRoleResults contains results of the Certificate.GetRole
type CertificateMockGetRoleResults struct {
s1 mm_insolar.StaticRole
}
// Expect sets up expected params for Certificate.GetRole
func (mmGetRole *mCertificateMockGetRole) Expect() *mCertificateMockGetRole {
if mmGetRole.mock.funcGetRole != nil {
mmGetRole.mock.t.Fatalf("CertificateMock.GetRole mock is already set by Set")
}
if mmGetRole.defaultExpectation == nil {
mmGetRole.defaultExpectation = &CertificateMockGetRoleExpectation{}
}
return mmGetRole
}
// Inspect accepts an inspector function that has same arguments as the Certificate.GetRole
func (mmGetRole *mCertificateMockGetRole) Inspect(f func()) *mCertificateMockGetRole {
if mmGetRole.mock.inspectFuncGetRole != nil {
mmGetRole.mock.t.Fatalf("Inspect function is already set for CertificateMock.GetRole")
}
mmGetRole.mock.inspectFuncGetRole = f
return mmGetRole
}
// Return sets up results that will be returned by Certificate.GetRole
func (mmGetRole *mCertificateMockGetRole) Return(s1 mm_insolar.StaticRole) *CertificateMock {
if mmGetRole.mock.funcGetRole != nil {
mmGetRole.mock.t.Fatalf("CertificateMock.GetRole mock is already set by Set")
}