@@ -61,6 +61,69 @@ describe('ModuleFactoryWrapper', () => {
61
61
} ) ;
62
62
} ) ;
63
63
64
+ describe ( 'Title' , ( ) => {
65
+ test ( 'should get title' , async ( ) => {
66
+ // Address expected
67
+ const expectedResult = 'Title' ;
68
+ // Mocked method
69
+ const mockedMethod = mock ( MockedCallMethod ) ;
70
+ // Stub the method
71
+ when ( mockedContract . title ) . thenReturn ( instance ( mockedMethod ) ) ;
72
+ // Stub the request
73
+ when ( mockedMethod . callAsync ( ) ) . thenResolve ( expectedResult ) ;
74
+
75
+ // Real call
76
+ const result = await target . title ( ) ;
77
+ // Result expectation
78
+ expect ( result ) . toBe ( expectedResult ) ;
79
+ // Verifications
80
+ verify ( mockedContract . title ) . once ( ) ;
81
+ verify ( mockedMethod . callAsync ( ) ) . once ( ) ;
82
+ } ) ;
83
+ } ) ;
84
+
85
+ describe ( 'Description' , ( ) => {
86
+ test ( 'should get description' , async ( ) => {
87
+ // Address expected
88
+ const expectedResult = 'Description' ;
89
+ // Mocked method
90
+ const mockedMethod = mock ( MockedCallMethod ) ;
91
+ // Stub the method
92
+ when ( mockedContract . description ) . thenReturn ( instance ( mockedMethod ) ) ;
93
+ // Stub the request
94
+ when ( mockedMethod . callAsync ( ) ) . thenResolve ( expectedResult ) ;
95
+
96
+ // Real call
97
+ const result = await target . description ( ) ;
98
+ // Result expectation
99
+ expect ( result ) . toBe ( expectedResult ) ;
100
+ // Verifications
101
+ verify ( mockedContract . description ) . once ( ) ;
102
+ verify ( mockedMethod . callAsync ( ) ) . once ( ) ;
103
+ } ) ;
104
+ } ) ;
105
+
106
+ describe ( 'IsCostInPoly' , ( ) => {
107
+ test ( 'should get isCostInPoly' , async ( ) => {
108
+ // Address expected
109
+ const expectedResult = true ;
110
+ // Mocked method
111
+ const mockedMethod = mock ( MockedCallMethod ) ;
112
+ // Stub the method
113
+ when ( mockedContract . isCostInPoly ) . thenReturn ( instance ( mockedMethod ) ) ;
114
+ // Stub the request
115
+ when ( mockedMethod . callAsync ( ) ) . thenResolve ( expectedResult ) ;
116
+
117
+ // Real call
118
+ const result = await target . isCostInPoly ( ) ;
119
+ // Result expectation
120
+ expect ( result ) . toBe ( expectedResult ) ;
121
+ // Verifications
122
+ verify ( mockedContract . isCostInPoly ) . once ( ) ;
123
+ verify ( mockedMethod . callAsync ( ) ) . once ( ) ;
124
+ } ) ;
125
+ } ) ;
126
+
64
127
describe ( 'Version' , ( ) => {
65
128
test ( 'should get version' , async ( ) => {
66
129
// Address expected
0 commit comments