Mocking with Dart
问题 I've been trying to get my head around the mocking library in dart, but it seems I've still not got it. In my library, I have an HTTP request to an external resource, which I would like to mock as to not rely on the external resource all the time. The main class in my library looks like this: SampleClass(String arg1, String arg2, [http.Client httpClient = null]) { this._arg1 = arg1; this._arg2 = arg2; _httpClient = (httpClient == null) ? http.Request : httpClient; } So I have prepared my