@@ -71,6 +71,25 @@ void main() {
7171 debugDefaultTargetPlatformOverride = null ;
7272 });
7373
74+ test (
75+ 'Should receive false when availability is null' ,
76+ () async {
77+ const availability = null ;
78+
79+ MethodChannelMock (
80+ channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
81+ method: 'makeGooglePlayServicesAvailable' ,
82+ result: availability,
83+ );
84+
85+ final googlePlayServiceAvailability =
86+ await const GoogleApiAvailability .private ()
87+ .makeGooglePlayServicesAvailable ();
88+
89+ expect (googlePlayServiceAvailability,
90+ false );
91+ });
92+
7493 test (
7594 'Should receive true when device is able to set Google Play Services to available' ,
7695 () async {
@@ -104,6 +123,25 @@ void main() {
104123 debugDefaultTargetPlatformOverride = null ;
105124 });
106125
126+ test (
127+ 'Should receive "ErrorString is null" when availability is null' ,
128+ () async {
129+ const errorString = null ;
130+
131+ MethodChannelMock (
132+ channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
133+ method: 'getErrorString' ,
134+ result: errorString,
135+ );
136+
137+ final errorStringResult =
138+ await const GoogleApiAvailability .private ()
139+ .getErrorString ();
140+
141+ expect (errorStringResult,
142+ "ErrorString is null" );
143+ });
144+
107145 test ('Should receive SUCCESS when connection status is success' , () async {
108146 MethodChannelMock (
109147 channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
@@ -130,6 +168,25 @@ void main() {
130168 debugDefaultTargetPlatformOverride = null ;
131169 });
132170
171+ test (
172+ 'Should receive false when isUserResolvable is null' ,
173+ () async {
174+ const isUserResolvable = null ;
175+
176+ MethodChannelMock (
177+ channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
178+ method: 'isUserResolvable' ,
179+ result: isUserResolvable,
180+ );
181+
182+ final isUserResolvableResult =
183+ await const GoogleApiAvailability .private ()
184+ .isUserResolvable ();
185+
186+ expect (isUserResolvableResult,
187+ false );
188+ });
189+
133190 test ('Should receive true when error is user resolvable' , () async {
134191 MethodChannelMock (
135192 channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
@@ -156,6 +213,25 @@ void main() {
156213 debugDefaultTargetPlatformOverride = null ;
157214 });
158215
216+ test (
217+ 'Should receive false when showErrorNotification is null' ,
218+ () async {
219+ const showErrorNotification = null ;
220+
221+ MethodChannelMock (
222+ channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
223+ method: 'showErrorNotification' ,
224+ result: showErrorNotification,
225+ );
226+
227+ final showErrorNotificationResult =
228+ await const GoogleApiAvailability .private ()
229+ .showErrorNotification ();
230+
231+ expect (showErrorNotificationResult,
232+ false );
233+ });
234+
159235 test ('Should receive true when notification is shown' , () async {
160236 MethodChannelMock (
161237 channelName: 'flutter.baseflow.com/google_api_availability/methods' ,
0 commit comments