start package cocoon_server for shared server-side cocoon code (#4056)
`app_dart` and `auto_submit` provide essentially the same service from two different entrypoints. Right now it's annoying to have to maintain copies of various services like Bigquery, API auth clients, datastore, firestore, graphql, REST API, etc. Every time we decide to move a piece of functionality between `app_dart` and `auto_submit` it involves unnecessary code copying and movement. For example, notice how https://github.com/flutter/cocoon/pull/4043 had to duplicate `deleteBranch` in `app_dart`'s bespoke `github_service.dart`.
This PR introduces a local package `cocoon_server` depended on by both `app_dart` and `auto_submit`. This PR only moves `bigquery.dart` and `access_client_provider.dart`. Future PRs can move more shared code into `cocoon_server`. Eventually, `app_dart` and `auto_submit` could become thin shells over `cocoon_server` that simply adapt it to their respective runtime environments.
diff --git a/app_dart/lib/src/service/bigquery.dart b/app_dart/lib/src/service/bigquery.dart
index 2b32870..4b2a632 100644
--- a/app_dart/lib/src/service/bigquery.dart
+++ b/app_dart/lib/src/service/bigquery.dart
@@ -4,11 +4,10 @@
import 'dart:async';
+import 'package:cocoon_server/access_client_provider.dart';
import 'package:googleapis/bigquery/v2.dart';
import 'package:http/http.dart';
-import 'access_client_provider.dart';
-
/// The sql query to query the build statistic from the
/// `flutter-dashboard.datasite.luci_prod_build_status`.
///
diff --git a/app_dart/lib/src/service/config.dart b/app_dart/lib/src/service/config.dart
index 6809676..9851115 100644
--- a/app_dart/lib/src/service/config.dart
+++ b/app_dart/lib/src/service/config.dart
@@ -7,6 +7,7 @@
import 'package:appengine/appengine.dart';
import 'package:cocoon_service/src/service/datastore.dart';
+import 'package:cocoon_server/access_client_provider.dart';
import 'package:corsac_jwt/corsac_jwt.dart';
import 'package:gcloud/db.dart';
import 'package:gcloud/service_scope.dart' as ss;
@@ -21,7 +22,6 @@
import '../model/appengine/branch.dart';
import '../model/appengine/cocoon_config.dart';
import '../model/appengine/key_helper.dart';
-import 'access_client_provider.dart';
import 'bigquery.dart';
import 'github_service.dart';
import 'logging.dart';
diff --git a/app_dart/lib/src/service/firestore.dart b/app_dart/lib/src/service/firestore.dart
index 97cf60d..970ce56 100644
--- a/app_dart/lib/src/service/firestore.dart
+++ b/app_dart/lib/src/service/firestore.dart
@@ -4,6 +4,7 @@
import 'dart:async';
+import 'package:cocoon_server/access_client_provider.dart';
import 'package:cocoon_service/cocoon_service.dart';
import 'package:github/github.dart';
import 'package:googleapis/firestore/v1.dart';
@@ -13,7 +14,6 @@
import '../model/firestore/github_build_status.dart';
import '../model/firestore/github_gold_status.dart';
import '../model/firestore/task.dart';
-import 'access_client_provider.dart';
import 'config.dart';
const String kDatabase = 'projects/${Config.flutterGcpProjectId}/databases/${Config.flutterGcpFirestoreDatabase}';
diff --git a/app_dart/pubspec.yaml b/app_dart/pubspec.yaml
index 480b29a..e88d0a7 100644
--- a/app_dart/pubspec.yaml
+++ b/app_dart/pubspec.yaml
@@ -20,17 +20,17 @@
dbcrypt: 2.0.0
file: 7.0.0
fixnum: 1.1.0
- gcloud: 0.8.12
+ gcloud: 0.8.18
github: 9.24.0
- googleapis: 12.0.0
+ googleapis: 13.2.0
googleapis_auth: 1.6.0
gql: 1.0.1-alpha+1709845491443
- graphql: 5.2.0-beta.7
+ graphql: 5.2.0-beta.9
grpc: 3.2.4
- http: 1.2.1
+ http: ^1.2.1
json_annotation: 4.8.1
logging: 1.2.0
- meta: 1.14.0
+ meta: ^1.16.0
mime: 1.0.5
mutex: 3.1.0
neat_cache: 2.0.4
@@ -41,6 +41,8 @@
retry: ^3.1.2
truncate: 3.0.1
yaml: 3.1.2
+ cocoon_server:
+ path: ../cocoon_server
dependency_overrides:
protobuf: 3.1.0
diff --git a/app_dart/test/request_handlers/check_flaky_builders_test.dart b/app_dart/test/request_handlers/check_flaky_builders_test.dart
index 2c64e7e..e653260 100644
--- a/app_dart/test/request_handlers/check_flaky_builders_test.dart
+++ b/app_dart/test/request_handlers/check_flaky_builders_test.dart
@@ -14,6 +14,7 @@
import 'package:test/test.dart';
import 'package:yaml/yaml.dart';
import 'package:cocoon_service/src/model/proto/internal/scheduler.pb.dart' as pb;
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/request_handling/api_request_handler_tester.dart';
diff --git a/app_dart/test/request_handlers/file_flaky_issue_and_pr_test.dart b/app_dart/test/request_handlers/file_flaky_issue_and_pr_test.dart
index 0274626..b2aca0a 100644
--- a/app_dart/test/request_handlers/file_flaky_issue_and_pr_test.dart
+++ b/app_dart/test/request_handlers/file_flaky_issue_and_pr_test.dart
@@ -15,6 +15,7 @@
import 'package:test/test.dart';
import 'package:yaml/yaml.dart';
import 'package:cocoon_service/src/model/proto/internal/scheduler.pb.dart' as pb;
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/request_handling/api_request_handler_tester.dart';
diff --git a/app_dart/test/request_handlers/flaky_handler_utiles_test.dart b/app_dart/test/request_handlers/flaky_handler_utiles_test.dart
index 81645c4..19dc452 100644
--- a/app_dart/test/request_handlers/flaky_handler_utiles_test.dart
+++ b/app_dart/test/request_handlers/flaky_handler_utiles_test.dart
@@ -9,9 +9,9 @@
import 'package:github/github.dart' hide Team;
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
-import '../src/utilities/mocks.dart';
void main() {
group('Gets test ownership', () {
diff --git a/app_dart/test/request_handlers/github/webhook_subscription_test.dart b/app_dart/test/request_handlers/github/webhook_subscription_test.dart
index 0c44eda..1589abc 100644
--- a/app_dart/test/request_handlers/github/webhook_subscription_test.dart
+++ b/app_dart/test/request_handlers/github/webhook_subscription_test.dart
@@ -18,6 +18,7 @@
import 'package:logging/logging.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../../src/datastore/fake_config.dart';
import '../../src/datastore/fake_datastore.dart';
diff --git a/app_dart/test/request_handlers/presubmit_luci_subscription_test.dart b/app_dart/test/request_handlers/presubmit_luci_subscription_test.dart
index 3cbc899..7ebb0a0 100644
--- a/app_dart/test/request_handlers/presubmit_luci_subscription_test.dart
+++ b/app_dart/test/request_handlers/presubmit_luci_subscription_test.dart
@@ -7,6 +7,7 @@
import 'package:fixnum/fixnum.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/request_handling/fake_authentication.dart';
diff --git a/app_dart/test/request_handlers/push_build_status_to_github_test.dart b/app_dart/test/request_handlers/push_build_status_to_github_test.dart
index a737c5f..cd35b52 100644
--- a/app_dart/test/request_handlers/push_build_status_to_github_test.dart
+++ b/app_dart/test/request_handlers/push_build_status_to_github_test.dart
@@ -13,6 +13,7 @@
import 'package:googleapis/firestore/v1.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/bigquery/fake_tabledata_resource.dart';
import '../src/datastore/fake_config.dart';
diff --git a/app_dart/test/request_handlers/push_gold_status_to_github_test.dart b/app_dart/test/request_handlers/push_gold_status_to_github_test.dart
index 603065b..ce6f141 100644
--- a/app_dart/test/request_handlers/push_gold_status_to_github_test.dart
+++ b/app_dart/test/request_handlers/push_gold_status_to_github_test.dart
@@ -22,6 +22,7 @@
import 'package:mockito/mockito.dart';
import 'package:retry/retry.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/datastore/fake_datastore.dart';
diff --git a/app_dart/test/request_handlers/reset_try_task_test.dart b/app_dart/test/request_handlers/reset_try_task_test.dart
index 5a6adbf..bd77b2a 100644
--- a/app_dart/test/request_handlers/reset_try_task_test.dart
+++ b/app_dart/test/request_handlers/reset_try_task_test.dart
@@ -8,6 +8,7 @@
import 'package:github/github.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/request_handling/api_request_handler_tester.dart';
diff --git a/app_dart/test/request_handlers/update_existing_flaky_issues_test.dart b/app_dart/test/request_handlers/update_existing_flaky_issues_test.dart
index 77c8d2d..eba1e8c 100644
--- a/app_dart/test/request_handlers/update_existing_flaky_issues_test.dart
+++ b/app_dart/test/request_handlers/update_existing_flaky_issues_test.dart
@@ -12,6 +12,7 @@
import 'package:http/http.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/request_handling/api_request_handler_tester.dart';
diff --git a/app_dart/test/request_handlers/vacuum_github_commits_test.dart b/app_dart/test/request_handlers/vacuum_github_commits_test.dart
index 2bd7cb0..0c38222 100644
--- a/app_dart/test/request_handlers/vacuum_github_commits_test.dart
+++ b/app_dart/test/request_handlers/vacuum_github_commits_test.dart
@@ -13,6 +13,7 @@
import 'package:googleapis/bigquery/v2.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_config.dart';
import '../src/datastore/fake_datastore.dart';
diff --git a/app_dart/test/service/bigquery_test.dart b/app_dart/test/service/bigquery_test.dart
index 09f5387..4498222 100644
--- a/app_dart/test/service/bigquery_test.dart
+++ b/app_dart/test/service/bigquery_test.dart
@@ -9,9 +9,9 @@
import 'package:googleapis/bigquery/v2.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/service/fake_bigquery_service.dart';
-import '../src/utilities/mocks.dart';
const String semanticsIntegrationTestResponse = '''
{
diff --git a/app_dart/test/service/branch_service_test.dart b/app_dart/test/service/branch_service_test.dart
index 15beb83..7fbfac6 100644
--- a/app_dart/test/service/branch_service_test.dart
+++ b/app_dart/test/service/branch_service_test.dart
@@ -11,6 +11,7 @@
import 'package:mockito/mockito.dart';
import 'package:retry/retry.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../request_handlers/check_flaky_builders_test_data.dart';
import '../src/datastore/fake_datastore.dart';
diff --git a/app_dart/test/service/commit_service_test.dart b/app_dart/test/service/commit_service_test.dart
index c7a965c..e44c5cb 100644
--- a/app_dart/test/service/commit_service_test.dart
+++ b/app_dart/test/service/commit_service_test.dart
@@ -12,6 +12,7 @@
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
import 'package:github/hooks.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../src/datastore/fake_datastore.dart';
import '../src/utilities/entity_generators.dart';
diff --git a/app_dart/test/service/firestore_test.dart b/app_dart/test/service/firestore_test.dart
index 30142ee..c57b865 100644
--- a/app_dart/test/service/firestore_test.dart
+++ b/app_dart/test/service/firestore_test.dart
@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'package:cocoon_service/src/model/firestore/github_gold_status.dart';
-import 'package:cocoon_service/src/service/access_client_provider.dart';
+import 'package:cocoon_server/access_client_provider.dart';
import 'package:cocoon_service/src/service/firestore.dart';
import 'package:googleapis/firestore/v1.dart';
diff --git a/app_dart/test/service/github_service_test.dart b/app_dart/test/service/github_service_test.dart
index 405c2c8..42be9ed 100644
--- a/app_dart/test/service/github_service_test.dart
+++ b/app_dart/test/service/github_service_test.dart
@@ -6,6 +6,7 @@
import 'dart:io';
import 'package:cocoon_service/src/service/github_service.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import 'package:github/github.dart';
import 'package:http/http.dart' as http;
diff --git a/app_dart/test/service/scheduler_test.dart b/app_dart/test/service/scheduler_test.dart
index d148dbf..41f8f26 100644
--- a/app_dart/test/service/scheduler_test.dart
+++ b/app_dart/test/service/scheduler_test.dart
@@ -28,6 +28,7 @@
import 'package:http/testing.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../model/github/checks_test_data.dart';
import '../src/datastore/fake_config.dart';
diff --git a/app_dart/test/src/bigquery/fake_tabledata_resource.dart b/app_dart/test/src/bigquery/fake_tabledata_resource.dart
index 9b7581f..6af3070 100644
--- a/app_dart/test/src/bigquery/fake_tabledata_resource.dart
+++ b/app_dart/test/src/bigquery/fake_tabledata_resource.dart
@@ -28,6 +28,8 @@
String projectId,
String datasetId,
String tableId, {
+ // ignore: non_constant_identifier_names the name comes from the super method
+ bool? formatOptions_useInt64Timestamp,
int? maxResults,
String? selectedFields,
String? startIndex,
diff --git a/app_dart/test/src/datastore/fake_datastore.dart b/app_dart/test/src/datastore/fake_datastore.dart
index 93540f0..e1feaa1 100644
--- a/app_dart/test/src/datastore/fake_datastore.dart
+++ b/app_dart/test/src/datastore/fake_datastore.dart
@@ -180,7 +180,7 @@
@override
void order(String orderString) {
if (orderString.startsWith('-')) {
- orders.add(FakeOrderSpec._(orderString.substring(1), OrderDirection.Decending));
+ orders.add(FakeOrderSpec._(orderString.substring(1), OrderDirection.Descending));
} else {
orders.add(FakeOrderSpec._(orderString, OrderDirection.Ascending));
}
diff --git a/app_dart/test/src/service/fake_bigquery_service.dart b/app_dart/test/src/service/fake_bigquery_service.dart
index 7013242..6f2d60f 100644
--- a/app_dart/test/src/service/fake_bigquery_service.dart
+++ b/app_dart/test/src/service/fake_bigquery_service.dart
@@ -4,8 +4,7 @@
import 'package:cocoon_service/src/service/bigquery.dart';
import 'package:googleapis/bigquery/v2.dart';
-
-import '../utilities/mocks.dart';
+import 'package:cocoon_server/testing/mocks.dart';
class FakeBigqueryService extends BigqueryService {
FakeBigqueryService(this.jobsResource) : super(MockAccessClientProvider());
diff --git a/app_dart/test/src/service/fake_github_service.dart b/app_dart/test/src/service/fake_github_service.dart
index a659e00..e8ac4be 100644
--- a/app_dart/test/src/service/fake_github_service.dart
+++ b/app_dart/test/src/service/fake_github_service.dart
@@ -3,10 +3,9 @@
// found in the LICENSE file.
import 'package:cocoon_service/src/service/github_service.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import 'package:github/github.dart';
-import '../utilities/mocks.dart';
-
/// A fake GithubService implementation.
class FakeGithubService implements GithubService {
FakeGithubService({GitHub? client}) : github = client ?? MockGitHub();
diff --git a/app_dart/test/src/utilities/mocks.dart b/app_dart/test/src/utilities/mocks.dart
index 6f7a16a..c0e4d45 100644
--- a/app_dart/test/src/utilities/mocks.dart
+++ b/app_dart/test/src/utilities/mocks.dart
@@ -8,7 +8,6 @@
import 'package:cocoon_service/src/foundation/github_checks_util.dart';
import 'package:cocoon_service/src/model/firestore/ci_staging.dart';
import 'package:cocoon_service/src/request_handling/exceptions.dart';
-import 'package:cocoon_service/src/service/access_client_provider.dart';
import 'package:cocoon_service/src/service/access_token_provider.dart';
import 'package:cocoon_service/src/service/bigquery.dart';
import 'package:cocoon_service/src/service/branch_service.dart';
@@ -63,7 +62,6 @@
@GenerateMocks(
<Type>[
- AccessClientProvider,
AccessTokenService,
BigqueryService,
BranchService,
@@ -82,11 +80,8 @@
HttpClient,
HttpClientRequest,
HttpClientResponse,
- JobsResource,
LuciBuildService,
ProcessManager,
- PullRequestsService,
- RepositoriesService,
SearchService,
TabledataResource,
UsersService,
@@ -96,11 +91,11 @@
],
customMocks: [
MockSpec<Cache<Uint8List>>(),
- MockSpec<GitHub>(
- fallbackGenerators: <Symbol, Function>{
- #postJSON: postJsonShim,
- },
- ),
+ // MockSpec<GitHub>(
+ // fallbackGenerators: <Symbol, Function>{
+ // #postJSON: postJsonShim,
+ // },
+ // ),
],
)
void main() {}
diff --git a/app_dart/test/src/utilities/mocks.mocks.dart b/app_dart/test/src/utilities/mocks.mocks.dart
index bc4c124..d980786 100644
--- a/app_dart/test/src/utilities/mocks.mocks.dart
+++ b/app_dart/test/src/utilities/mocks.mocks.dart
@@ -10,6 +10,7 @@
import 'package:appengine/appengine.dart' as _i10;
import 'package:buildbucket/buildbucket_pb.dart' as _i8;
+import 'package:cocoon_server/access_client_provider.dart' as _i4;
import 'package:cocoon_service/cocoon_service.dart' as _i15;
import 'package:cocoon_service/src/foundation/github_checks_util.dart' as _i24;
import 'package:cocoon_service/src/model/appengine/branch.dart' as _i35;
@@ -26,24 +27,23 @@
import 'package:cocoon_service/src/model/firestore/github_gold_status.dart' as _i22;
import 'package:cocoon_service/src/model/firestore/task.dart' as _i42;
import 'package:cocoon_service/src/model/github/checks.dart' as _i44;
-import 'package:cocoon_service/src/service/access_client_provider.dart' as _i5;
import 'package:cocoon_service/src/service/access_token_provider.dart' as _i30;
import 'package:cocoon_service/src/service/bigquery.dart' as _i16;
import 'package:cocoon_service/src/service/commit_service.dart' as _i33;
-import 'package:cocoon_service/src/service/config.dart' as _i3;
+import 'package:cocoon_service/src/service/config.dart' as _i2;
import 'package:cocoon_service/src/service/datastore.dart' as _i9;
-import 'package:cocoon_service/src/service/gerrit_service.dart' as _i7;
+import 'package:cocoon_service/src/service/gerrit_service.dart' as _i6;
import 'package:cocoon_service/src/service/github_service.dart' as _i17;
import 'package:fixnum/fixnum.dart' as _i45;
import 'package:gcloud/db.dart' as _i11;
import 'package:github/github.dart' as _i13;
import 'package:github/hooks.dart' as _i34;
-import 'package:googleapis/bigquery/v2.dart' as _i6;
+import 'package:googleapis/bigquery/v2.dart' as _i5;
import 'package:googleapis/firestore/v1.dart' as _i21;
import 'package:googleapis/shared.dart' as _i27;
-import 'package:googleapis_auth/auth_io.dart' as _i4;
+import 'package:googleapis_auth/auth_io.dart' as _i3;
import 'package:graphql/client.dart' as _i14;
-import 'package:http/http.dart' as _i2;
+import 'package:http/http.dart' as _i7;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i32;
import 'package:neat_cache/neat_cache.dart' as _i29;
@@ -66,8 +66,8 @@
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
-class _FakeClient_0 extends _i1.SmartFake implements _i2.Client {
- _FakeClient_0(
+class _FakeConfig_0 extends _i1.SmartFake implements _i2.Config {
+ _FakeConfig_0(
Object parent,
Invocation parentInvocation,
) : super(
@@ -76,8 +76,8 @@
);
}
-class _FakeConfig_1 extends _i1.SmartFake implements _i3.Config {
- _FakeConfig_1(
+class _FakeAccessToken_1 extends _i1.SmartFake implements _i3.AccessToken {
+ _FakeAccessToken_1(
Object parent,
Invocation parentInvocation,
) : super(
@@ -86,8 +86,8 @@
);
}
-class _FakeAccessToken_2 extends _i1.SmartFake implements _i4.AccessToken {
- _FakeAccessToken_2(
+class _FakeAccessClientProvider_2 extends _i1.SmartFake implements _i4.AccessClientProvider {
+ _FakeAccessClientProvider_2(
Object parent,
Invocation parentInvocation,
) : super(
@@ -96,8 +96,8 @@
);
}
-class _FakeAccessClientProvider_3 extends _i1.SmartFake implements _i5.AccessClientProvider {
- _FakeAccessClientProvider_3(
+class _FakeTabledataResource_3 extends _i1.SmartFake implements _i5.TabledataResource {
+ _FakeTabledataResource_3(
Object parent,
Invocation parentInvocation,
) : super(
@@ -106,8 +106,8 @@
);
}
-class _FakeTabledataResource_4 extends _i1.SmartFake implements _i6.TabledataResource {
- _FakeTabledataResource_4(
+class _FakeJobsResource_4 extends _i1.SmartFake implements _i5.JobsResource {
+ _FakeJobsResource_4(
Object parent,
Invocation parentInvocation,
) : super(
@@ -116,8 +116,8 @@
);
}
-class _FakeJobsResource_5 extends _i1.SmartFake implements _i6.JobsResource {
- _FakeJobsResource_5(
+class _FakeGerritService_5 extends _i1.SmartFake implements _i6.GerritService {
+ _FakeGerritService_5(
Object parent,
Invocation parentInvocation,
) : super(
@@ -126,8 +126,8 @@
);
}
-class _FakeGerritService_6 extends _i1.SmartFake implements _i7.GerritService {
- _FakeGerritService_6(
+class _FakeClient_6 extends _i1.SmartFake implements _i7.Client {
+ _FakeClient_6(
Object parent,
Invocation parentInvocation,
) : super(
@@ -677,8 +677,8 @@
);
}
-class _FakeJobCancelResponse_61 extends _i1.SmartFake implements _i6.JobCancelResponse {
- _FakeJobCancelResponse_61(
+class _FakeBuildBucketClient_61 extends _i1.SmartFake implements _i15.BuildBucketClient {
+ _FakeBuildBucketClient_61(
Object parent,
Invocation parentInvocation,
) : super(
@@ -687,8 +687,8 @@
);
}
-class _FakeJob_62 extends _i1.SmartFake implements _i6.Job {
- _FakeJob_62(
+class _FakeCacheService_62 extends _i1.SmartFake implements _i15.CacheService {
+ _FakeCacheService_62(
Object parent,
Invocation parentInvocation,
) : super(
@@ -697,8 +697,8 @@
);
}
-class _FakeGetQueryResultsResponse_63 extends _i1.SmartFake implements _i6.GetQueryResultsResponse {
- _FakeGetQueryResultsResponse_63(
+class _FakePubSub_63 extends _i1.SmartFake implements _i15.PubSub {
+ _FakePubSub_63(
Object parent,
Invocation parentInvocation,
) : super(
@@ -707,8 +707,8 @@
);
}
-class _FakeJobList_64 extends _i1.SmartFake implements _i6.JobList {
- _FakeJobList_64(
+class _FakeProcess_64 extends _i1.SmartFake implements _i25.Process {
+ _FakeProcess_64(
Object parent,
Invocation parentInvocation,
) : super(
@@ -717,8 +717,8 @@
);
}
-class _FakeQueryResponse_65 extends _i1.SmartFake implements _i6.QueryResponse {
- _FakeQueryResponse_65(
+class _FakeTableDataInsertAllResponse_65 extends _i1.SmartFake implements _i5.TableDataInsertAllResponse {
+ _FakeTableDataInsertAllResponse_65(
Object parent,
Invocation parentInvocation,
) : super(
@@ -727,8 +727,8 @@
);
}
-class _FakeBuildBucketClient_66 extends _i1.SmartFake implements _i15.BuildBucketClient {
- _FakeBuildBucketClient_66(
+class _FakeTableDataList_66 extends _i1.SmartFake implements _i5.TableDataList {
+ _FakeTableDataList_66(
Object parent,
Invocation parentInvocation,
) : super(
@@ -737,8 +737,8 @@
);
}
-class _FakeCacheService_67 extends _i1.SmartFake implements _i15.CacheService {
- _FakeCacheService_67(
+class _FakeUser_67 extends _i1.SmartFake implements _i13.User {
+ _FakeUser_67(
Object parent,
Invocation parentInvocation,
) : super(
@@ -747,8 +747,8 @@
);
}
-class _FakePubSub_68 extends _i1.SmartFake implements _i15.PubSub {
- _FakePubSub_68(
+class _FakeCurrentUser_68 extends _i1.SmartFake implements _i13.CurrentUser {
+ _FakeCurrentUser_68(
Object parent,
Invocation parentInvocation,
) : super(
@@ -757,8 +757,8 @@
);
}
-class _FakeProcess_69 extends _i1.SmartFake implements _i25.Process {
- _FakeProcess_69(
+class _FakePublicKey_69 extends _i1.SmartFake implements _i13.PublicKey {
+ _FakePublicKey_69(
Object parent,
Invocation parentInvocation,
) : super(
@@ -767,8 +767,8 @@
);
}
-class _FakePullRequestMerge_70 extends _i1.SmartFake implements _i13.PullRequestMerge {
- _FakePullRequestMerge_70(
+class _FakeBeginTransactionResponse_70 extends _i1.SmartFake implements _i21.BeginTransactionResponse {
+ _FakeBeginTransactionResponse_70(
Object parent,
Invocation parentInvocation,
) : super(
@@ -777,8 +777,8 @@
);
}
-class _FakePullRequestComment_71 extends _i1.SmartFake implements _i13.PullRequestComment {
- _FakePullRequestComment_71(
+class _Fake$Empty_71 extends _i1.SmartFake implements _i27.$Empty {
+ _Fake$Empty_71(
Object parent,
Invocation parentInvocation,
) : super(
@@ -787,8 +787,8 @@
);
}
-class _FakePullRequestReview_72 extends _i1.SmartFake implements _i13.PullRequestReview {
- _FakePullRequestReview_72(
+class _FakeListDocumentsResponse_72 extends _i1.SmartFake implements _i21.ListDocumentsResponse {
+ _FakeListDocumentsResponse_72(
Object parent,
Invocation parentInvocation,
) : super(
@@ -797,8 +797,8 @@
);
}
-class _FakeRepository_73 extends _i1.SmartFake implements _i13.Repository {
- _FakeRepository_73(
+class _FakeListCollectionIdsResponse_73 extends _i1.SmartFake implements _i21.ListCollectionIdsResponse {
+ _FakeListCollectionIdsResponse_73(
Object parent,
Invocation parentInvocation,
) : super(
@@ -807,8 +807,8 @@
);
}
-class _FakeLicenseDetails_74 extends _i1.SmartFake implements _i13.LicenseDetails {
- _FakeLicenseDetails_74(
+class _FakePartitionQueryResponse_74 extends _i1.SmartFake implements _i21.PartitionQueryResponse {
+ _FakePartitionQueryResponse_74(
Object parent,
Invocation parentInvocation,
) : super(
@@ -817,8 +817,8 @@
);
}
-class _FakeLanguageBreakdown_75 extends _i1.SmartFake implements _i13.LanguageBreakdown {
- _FakeLanguageBreakdown_75(
+class _FakeWriteResponse_75 extends _i1.SmartFake implements _i21.WriteResponse {
+ _FakeWriteResponse_75(
Object parent,
Invocation parentInvocation,
) : super(
@@ -827,8 +827,8 @@
);
}
-class _FakeBranch_76 extends _i1.SmartFake implements _i13.Branch {
- _FakeBranch_76(
+class _FakeStagingConclusion_76 extends _i1.SmartFake implements _i28.StagingConclusion {
+ _FakeStagingConclusion_76(
Object parent,
Invocation parentInvocation,
) : super(
@@ -837,8 +837,8 @@
);
}
-class _FakeCommitComment_77 extends _i1.SmartFake implements _i13.CommitComment {
- _FakeCommitComment_77(
+class _FakeEntry_77<T> extends _i1.SmartFake implements _i29.Entry<T> {
+ _FakeEntry_77(
Object parent,
Invocation parentInvocation,
) : super(
@@ -847,8 +847,8 @@
);
}
-class _FakeRepositoryCommit_78 extends _i1.SmartFake implements _i13.RepositoryCommit {
- _FakeRepositoryCommit_78(
+class _FakeCache_78<T> extends _i1.SmartFake implements _i29.Cache<T> {
+ _FakeCache_78(
Object parent,
Invocation parentInvocation,
) : super(
@@ -857,462 +857,6 @@
);
}
-class _FakeGitHubComparison_79 extends _i1.SmartFake implements _i13.GitHubComparison {
- _FakeGitHubComparison_79(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGitHubFile_80 extends _i1.SmartFake implements _i13.GitHubFile {
- _FakeGitHubFile_80(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryContents_81 extends _i1.SmartFake implements _i13.RepositoryContents {
- _FakeRepositoryContents_81(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeContentCreation_82 extends _i1.SmartFake implements _i13.ContentCreation {
- _FakeContentCreation_82(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeHook_83 extends _i1.SmartFake implements _i13.Hook {
- _FakeHook_83(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePublicKey_84 extends _i1.SmartFake implements _i13.PublicKey {
- _FakePublicKey_84(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryPages_85 extends _i1.SmartFake implements _i13.RepositoryPages {
- _FakeRepositoryPages_85(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePageBuild_86 extends _i1.SmartFake implements _i13.PageBuild {
- _FakePageBuild_86(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRelease_87 extends _i1.SmartFake implements _i13.Release {
- _FakeRelease_87(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeReleaseAsset_88 extends _i1.SmartFake implements _i13.ReleaseAsset {
- _FakeReleaseAsset_88(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeContributorParticipation_89 extends _i1.SmartFake implements _i13.ContributorParticipation {
- _FakeContributorParticipation_89(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryStatus_90 extends _i1.SmartFake implements _i13.RepositoryStatus {
- _FakeRepositoryStatus_90(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeCombinedRepositoryStatus_91 extends _i1.SmartFake implements _i13.CombinedRepositoryStatus {
- _FakeCombinedRepositoryStatus_91(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeReleaseNotes_92 extends _i1.SmartFake implements _i13.ReleaseNotes {
- _FakeReleaseNotes_92(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeTableDataInsertAllResponse_93 extends _i1.SmartFake implements _i6.TableDataInsertAllResponse {
- _FakeTableDataInsertAllResponse_93(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeTableDataList_94 extends _i1.SmartFake implements _i6.TableDataList {
- _FakeTableDataList_94(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeUser_95 extends _i1.SmartFake implements _i13.User {
- _FakeUser_95(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeCurrentUser_96 extends _i1.SmartFake implements _i13.CurrentUser {
- _FakeCurrentUser_96(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeBeginTransactionResponse_97 extends _i1.SmartFake implements _i21.BeginTransactionResponse {
- _FakeBeginTransactionResponse_97(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _Fake$Empty_98 extends _i1.SmartFake implements _i27.$Empty {
- _Fake$Empty_98(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeListDocumentsResponse_99 extends _i1.SmartFake implements _i21.ListDocumentsResponse {
- _FakeListDocumentsResponse_99(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeListCollectionIdsResponse_100 extends _i1.SmartFake implements _i21.ListCollectionIdsResponse {
- _FakeListCollectionIdsResponse_100(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePartitionQueryResponse_101 extends _i1.SmartFake implements _i21.PartitionQueryResponse {
- _FakePartitionQueryResponse_101(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeWriteResponse_102 extends _i1.SmartFake implements _i21.WriteResponse {
- _FakeWriteResponse_102(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeStagingConclusion_103 extends _i1.SmartFake implements _i28.StagingConclusion {
- _FakeStagingConclusion_103(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeEntry_104<T> extends _i1.SmartFake implements _i29.Entry<T> {
- _FakeEntry_104(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeCache_105<T> extends _i1.SmartFake implements _i29.Cache<T> {
- _FakeCache_105(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeAuthentication_106 extends _i1.SmartFake implements _i13.Authentication {
- _FakeAuthentication_106(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeActivityService_107 extends _i1.SmartFake implements _i13.ActivityService {
- _FakeActivityService_107(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeAuthorizationsService_108 extends _i1.SmartFake implements _i13.AuthorizationsService {
- _FakeAuthorizationsService_108(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGistsService_109 extends _i1.SmartFake implements _i13.GistsService {
- _FakeGistsService_109(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGitService_110 extends _i1.SmartFake implements _i13.GitService {
- _FakeGitService_110(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeIssuesService_111 extends _i1.SmartFake implements _i13.IssuesService {
- _FakeIssuesService_111(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeMiscService_112 extends _i1.SmartFake implements _i13.MiscService {
- _FakeMiscService_112(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeOrganizationsService_113 extends _i1.SmartFake implements _i13.OrganizationsService {
- _FakeOrganizationsService_113(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePullRequestsService_114 extends _i1.SmartFake implements _i13.PullRequestsService {
- _FakePullRequestsService_114(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoriesService_115 extends _i1.SmartFake implements _i13.RepositoriesService {
- _FakeRepositoriesService_115(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeSearchService_116 extends _i1.SmartFake implements _i13.SearchService {
- _FakeSearchService_116(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeUrlShortenerService_117 extends _i1.SmartFake implements _i13.UrlShortenerService {
- _FakeUrlShortenerService_117(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeUsersService_118 extends _i1.SmartFake implements _i13.UsersService {
- _FakeUsersService_118(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeChecksService_119 extends _i1.SmartFake implements _i13.ChecksService {
- _FakeChecksService_119(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeResponse_120 extends _i1.SmartFake implements _i2.Response {
- _FakeResponse_120(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-/// A class which mocks [AccessClientProvider].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockAccessClientProvider extends _i1.Mock implements _i5.AccessClientProvider {
- MockAccessClientProvider() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i20.Future<_i2.Client> createAccessClient({
- List<String>? scopes = const [r'https://www.googleapis.com/auth/cloud-platform'],
- _i2.Client? baseClient,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createAccessClient,
- [],
- {
- #scopes: scopes,
- #baseClient: baseClient,
- },
- ),
- returnValue: _i20.Future<_i2.Client>.value(_FakeClient_0(
- this,
- Invocation.method(
- #createAccessClient,
- [],
- {
- #scopes: scopes,
- #baseClient: baseClient,
- },
- ),
- )),
- ) as _i20.Future<_i2.Client>);
-}
-
/// A class which mocks [AccessTokenService].
///
/// See the documentation for Mockito's code generation for more information.
@@ -1322,28 +866,28 @@
}
@override
- _i3.Config get config => (super.noSuchMethod(
+ _i2.Config get config => (super.noSuchMethod(
Invocation.getter(#config),
- returnValue: _FakeConfig_1(
+ returnValue: _FakeConfig_0(
this,
Invocation.getter(#config),
),
- ) as _i3.Config);
+ ) as _i2.Config);
@override
- _i20.Future<_i4.AccessToken> createAccessToken() => (super.noSuchMethod(
+ _i20.Future<_i3.AccessToken> createAccessToken() => (super.noSuchMethod(
Invocation.method(
#createAccessToken,
[],
),
- returnValue: _i20.Future<_i4.AccessToken>.value(_FakeAccessToken_2(
+ returnValue: _i20.Future<_i3.AccessToken>.value(_FakeAccessToken_1(
this,
Invocation.method(
#createAccessToken,
[],
),
)),
- ) as _i20.Future<_i4.AccessToken>);
+ ) as _i20.Future<_i3.AccessToken>);
}
/// A class which mocks [BigqueryService].
@@ -1355,43 +899,43 @@
}
@override
- _i5.AccessClientProvider get accessClientProvider => (super.noSuchMethod(
+ _i4.AccessClientProvider get accessClientProvider => (super.noSuchMethod(
Invocation.getter(#accessClientProvider),
- returnValue: _FakeAccessClientProvider_3(
+ returnValue: _FakeAccessClientProvider_2(
this,
Invocation.getter(#accessClientProvider),
),
- ) as _i5.AccessClientProvider);
+ ) as _i4.AccessClientProvider);
@override
- _i20.Future<_i6.TabledataResource> defaultTabledata() => (super.noSuchMethod(
+ _i20.Future<_i5.TabledataResource> defaultTabledata() => (super.noSuchMethod(
Invocation.method(
#defaultTabledata,
[],
),
- returnValue: _i20.Future<_i6.TabledataResource>.value(_FakeTabledataResource_4(
+ returnValue: _i20.Future<_i5.TabledataResource>.value(_FakeTabledataResource_3(
this,
Invocation.method(
#defaultTabledata,
[],
),
)),
- ) as _i20.Future<_i6.TabledataResource>);
+ ) as _i20.Future<_i5.TabledataResource>);
@override
- _i20.Future<_i6.JobsResource> defaultJobs() => (super.noSuchMethod(
+ _i20.Future<_i5.JobsResource> defaultJobs() => (super.noSuchMethod(
Invocation.method(
#defaultJobs,
[],
),
- returnValue: _i20.Future<_i6.JobsResource>.value(_FakeJobsResource_5(
+ returnValue: _i20.Future<_i5.JobsResource>.value(_FakeJobsResource_4(
this,
Invocation.method(
#defaultJobs,
[],
),
)),
- ) as _i20.Future<_i6.JobsResource>);
+ ) as _i20.Future<_i5.JobsResource>);
@override
_i20.Future<List<_i16.BuilderStatistic>> listBuilderStatistic(
@@ -1439,22 +983,22 @@
}
@override
- _i3.Config get config => (super.noSuchMethod(
+ _i2.Config get config => (super.noSuchMethod(
Invocation.getter(#config),
- returnValue: _FakeConfig_1(
+ returnValue: _FakeConfig_0(
this,
Invocation.getter(#config),
),
- ) as _i3.Config);
+ ) as _i2.Config);
@override
- _i7.GerritService get gerritService => (super.noSuchMethod(
+ _i6.GerritService get gerritService => (super.noSuchMethod(
Invocation.getter(#gerritService),
- returnValue: _FakeGerritService_6(
+ returnValue: _FakeGerritService_5(
this,
Invocation.getter(#gerritService),
),
- ) as _i7.GerritService);
+ ) as _i6.GerritService);
@override
_i31.RetryOptions get retryOptions => (super.noSuchMethod(
@@ -1528,13 +1072,13 @@
) as String);
@override
- _i2.Client get httpClient => (super.noSuchMethod(
+ _i7.Client get httpClient => (super.noSuchMethod(
Invocation.getter(#httpClient),
- returnValue: _FakeClient_0(
+ returnValue: _FakeClient_6(
this,
Invocation.getter(#httpClient),
),
- ) as _i2.Client);
+ ) as _i7.Client);
@override
_i20.Future<_i8.Build> scheduleBuild(
@@ -1681,13 +1225,13 @@
}
@override
- _i3.Config get config => (super.noSuchMethod(
+ _i2.Config get config => (super.noSuchMethod(
Invocation.getter(#config),
- returnValue: _FakeConfig_1(
+ returnValue: _FakeConfig_0(
this,
Invocation.getter(#config),
),
- ) as _i3.Config);
+ ) as _i2.Config);
@override
_i9.DatastoreServiceProvider get datastoreProvider => (super.noSuchMethod(
@@ -1722,7 +1266,7 @@
/// A class which mocks [Config].
///
/// See the documentation for Mockito's code generation for more information.
-class MockConfig extends _i1.Mock implements _i3.Config {
+class MockConfig extends _i1.Mock implements _i2.Config {
MockConfig() {
_i1.throwOnMissingStub(this);
}
@@ -2241,19 +1785,19 @@
) as _i20.Future<_i16.BigqueryService>);
@override
- _i20.Future<_i6.TabledataResource> createTabledataResourceApi() => (super.noSuchMethod(
+ _i20.Future<_i5.TabledataResource> createTabledataResourceApi() => (super.noSuchMethod(
Invocation.method(
#createTabledataResourceApi,
[],
),
- returnValue: _i20.Future<_i6.TabledataResource>.value(_FakeTabledataResource_4(
+ returnValue: _i20.Future<_i5.TabledataResource>.value(_FakeTabledataResource_3(
this,
Invocation.method(
#createTabledataResourceApi,
[],
),
)),
- ) as _i20.Future<_i6.TabledataResource>);
+ ) as _i20.Future<_i5.TabledataResource>);
@override
_i20.Future<_i17.GithubService> createDefaultGitHubService() => (super.noSuchMethod(
@@ -2622,13 +2166,13 @@
}
@override
- _i5.AccessClientProvider get accessClientProvider => (super.noSuchMethod(
+ _i4.AccessClientProvider get accessClientProvider => (super.noSuchMethod(
Invocation.getter(#accessClientProvider),
- returnValue: _FakeAccessClientProvider_3(
+ returnValue: _FakeAccessClientProvider_2(
this,
Invocation.getter(#accessClientProvider),
),
- ) as _i5.AccessClientProvider);
+ ) as _i4.AccessClientProvider);
@override
_i20.Future<_i21.ProjectsDatabasesDocumentsResource> documentResource() => (super.noSuchMethod(
@@ -3578,16 +3122,16 @@
}
@override
- _i3.Config get config => (super.noSuchMethod(
+ _i2.Config get config => (super.noSuchMethod(
Invocation.getter(#config),
- returnValue: _FakeConfig_1(
+ returnValue: _FakeConfig_0(
this,
Invocation.getter(#config),
),
- ) as _i3.Config);
+ ) as _i2.Config);
@override
- set config(_i3.Config? _config) => super.noSuchMethod(
+ set config(_i2.Config? _config) => super.noSuchMethod(
Invocation.setter(
#config,
_config,
@@ -3796,7 +3340,7 @@
@override
_i20.Future<void> updateCheckRun(
- _i3.Config? config,
+ _i2.Config? config,
_i13.RepositorySlug? slug,
_i13.CheckRun? checkRun, {
_i13.CheckRunStatus? status = _i13.CheckRunStatus.queued,
@@ -3825,7 +3369,7 @@
@override
_i20.Future<_i13.CheckRun> getCheckRun(
- _i3.Config? config,
+ _i2.Config? config,
_i13.RepositorySlug? slug,
int? id,
) =>
@@ -3853,7 +3397,7 @@
@override
_i20.Future<_i13.CheckRun> createCheckRun(
- _i3.Config? config,
+ _i2.Config? config,
_i13.RepositorySlug? slug,
String? sha,
String? name, {
@@ -6217,270 +5761,6 @@
) as _i20.Stream<List<int>>);
}
-/// A class which mocks [JobsResource].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockJobsResource extends _i1.Mock implements _i6.JobsResource {
- MockJobsResource() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i20.Future<_i6.JobCancelResponse> cancel(
- String? projectId,
- String? jobId, {
- String? location,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #cancel,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- returnValue: _i20.Future<_i6.JobCancelResponse>.value(_FakeJobCancelResponse_61(
- this,
- Invocation.method(
- #cancel,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i20.Future<_i6.JobCancelResponse>);
-
- @override
- _i20.Future<void> delete(
- String? projectId,
- String? jobId, {
- String? location,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #delete,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- returnValue: _i20.Future<void>.value(),
- returnValueForMissingStub: _i20.Future<void>.value(),
- ) as _i20.Future<void>);
-
- @override
- _i20.Future<_i6.Job> get(
- String? projectId,
- String? jobId, {
- String? location,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #get,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- returnValue: _i20.Future<_i6.Job>.value(_FakeJob_62(
- this,
- Invocation.method(
- #get,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i20.Future<_i6.Job>);
-
- @override
- _i20.Future<_i6.GetQueryResultsResponse> getQueryResults(
- String? projectId,
- String? jobId, {
- String? location,
- int? maxResults,
- String? pageToken,
- String? startIndex,
- int? timeoutMs,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getQueryResults,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #maxResults: maxResults,
- #pageToken: pageToken,
- #startIndex: startIndex,
- #timeoutMs: timeoutMs,
- #$fields: $fields,
- },
- ),
- returnValue: _i20.Future<_i6.GetQueryResultsResponse>.value(_FakeGetQueryResultsResponse_63(
- this,
- Invocation.method(
- #getQueryResults,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #maxResults: maxResults,
- #pageToken: pageToken,
- #startIndex: startIndex,
- #timeoutMs: timeoutMs,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i20.Future<_i6.GetQueryResultsResponse>);
-
- @override
- _i20.Future<_i6.Job> insert(
- _i6.Job? request,
- String? projectId, {
- String? $fields,
- _i6.UploadOptions? uploadOptions = _i6.UploadOptions.defaultOptions,
- _i6.Media? uploadMedia,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #insert,
- [
- request,
- projectId,
- ],
- {
- #$fields: $fields,
- #uploadOptions: uploadOptions,
- #uploadMedia: uploadMedia,
- },
- ),
- returnValue: _i20.Future<_i6.Job>.value(_FakeJob_62(
- this,
- Invocation.method(
- #insert,
- [
- request,
- projectId,
- ],
- {
- #$fields: $fields,
- #uploadOptions: uploadOptions,
- #uploadMedia: uploadMedia,
- },
- ),
- )),
- ) as _i20.Future<_i6.Job>);
-
- @override
- _i20.Future<_i6.JobList> list(
- String? projectId, {
- bool? allUsers,
- String? maxCreationTime,
- int? maxResults,
- String? minCreationTime,
- String? pageToken,
- String? parentJobId,
- String? projection,
- List<String>? stateFilter,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #list,
- [projectId],
- {
- #allUsers: allUsers,
- #maxCreationTime: maxCreationTime,
- #maxResults: maxResults,
- #minCreationTime: minCreationTime,
- #pageToken: pageToken,
- #parentJobId: parentJobId,
- #projection: projection,
- #stateFilter: stateFilter,
- #$fields: $fields,
- },
- ),
- returnValue: _i20.Future<_i6.JobList>.value(_FakeJobList_64(
- this,
- Invocation.method(
- #list,
- [projectId],
- {
- #allUsers: allUsers,
- #maxCreationTime: maxCreationTime,
- #maxResults: maxResults,
- #minCreationTime: minCreationTime,
- #pageToken: pageToken,
- #parentJobId: parentJobId,
- #projection: projection,
- #stateFilter: stateFilter,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i20.Future<_i6.JobList>);
-
- @override
- _i20.Future<_i6.QueryResponse> query(
- _i6.QueryRequest? request,
- String? projectId, {
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #query,
- [
- request,
- projectId,
- ],
- {#$fields: $fields},
- ),
- returnValue: _i20.Future<_i6.QueryResponse>.value(_FakeQueryResponse_65(
- this,
- Invocation.method(
- #query,
- [
- request,
- projectId,
- ],
- {#$fields: $fields},
- ),
- )),
- ) as _i20.Future<_i6.QueryResponse>);
-}
-
/// A class which mocks [LuciBuildService].
///
/// See the documentation for Mockito's code generation for more information.
@@ -6492,7 +5772,7 @@
@override
_i15.BuildBucketClient get buildBucketClient => (super.noSuchMethod(
Invocation.getter(#buildBucketClient),
- returnValue: _FakeBuildBucketClient_66(
+ returnValue: _FakeBuildBucketClient_61(
this,
Invocation.getter(#buildBucketClient),
),
@@ -6510,23 +5790,23 @@
@override
_i15.CacheService get cache => (super.noSuchMethod(
Invocation.getter(#cache),
- returnValue: _FakeCacheService_67(
+ returnValue: _FakeCacheService_62(
this,
Invocation.getter(#cache),
),
) as _i15.CacheService);
@override
- _i3.Config get config => (super.noSuchMethod(
+ _i2.Config get config => (super.noSuchMethod(
Invocation.getter(#config),
- returnValue: _FakeConfig_1(
+ returnValue: _FakeConfig_0(
this,
Invocation.getter(#config),
),
- ) as _i3.Config);
+ ) as _i2.Config);
@override
- set config(_i3.Config? _config) => super.noSuchMethod(
+ set config(_i2.Config? _config) => super.noSuchMethod(
Invocation.setter(
#config,
_config,
@@ -6553,16 +5833,16 @@
);
@override
- _i7.GerritService get gerritService => (super.noSuchMethod(
+ _i6.GerritService get gerritService => (super.noSuchMethod(
Invocation.getter(#gerritService),
- returnValue: _FakeGerritService_6(
+ returnValue: _FakeGerritService_5(
this,
Invocation.getter(#gerritService),
),
- ) as _i7.GerritService);
+ ) as _i6.GerritService);
@override
- set gerritService(_i7.GerritService? _gerritService) => super.noSuchMethod(
+ set gerritService(_i6.GerritService? _gerritService) => super.noSuchMethod(
Invocation.setter(
#gerritService,
_gerritService,
@@ -6573,7 +5853,7 @@
@override
_i15.PubSub get pubsub => (super.noSuchMethod(
Invocation.getter(#pubsub),
- returnValue: _FakePubSub_68(
+ returnValue: _FakePubSub_63(
this,
Invocation.getter(#pubsub),
),
@@ -6955,7 +6235,7 @@
#mode: mode,
},
),
- returnValue: _i20.Future<_i25.Process>.value(_FakeProcess_69(
+ returnValue: _i20.Future<_i25.Process>.value(_FakeProcess_64(
this,
Invocation.method(
#start,
@@ -7082,1807 +6362,6 @@
) as bool);
}
-/// A class which mocks [PullRequestsService].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockPullRequestsService extends _i1.Mock implements _i13.PullRequestsService {
- MockPullRequestsService() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i13.GitHub get github => (super.noSuchMethod(
- Invocation.getter(#github),
- returnValue: _FakeGitHub_16(
- this,
- Invocation.getter(#github),
- ),
- ) as _i13.GitHub);
-
- @override
- _i20.Stream<_i13.PullRequest> list(
- _i13.RepositorySlug? slug, {
- int? pages,
- String? base,
- String? direction = r'desc',
- String? head,
- String? sort = r'created',
- String? state = r'open',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #list,
- [slug],
- {
- #pages: pages,
- #base: base,
- #direction: direction,
- #head: head,
- #sort: sort,
- #state: state,
- },
- ),
- returnValue: _i20.Stream<_i13.PullRequest>.empty(),
- ) as _i20.Stream<_i13.PullRequest>);
-
- @override
- _i20.Future<_i13.PullRequest> get(
- _i13.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #get,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i20.Future<_i13.PullRequest>.value(_FakePullRequest_41(
- this,
- Invocation.method(
- #get,
- [
- slug,
- number,
- ],
- ),
- )),
- ) as _i20.Future<_i13.PullRequest>);
-
- @override
- _i20.Future<_i13.PullRequest> create(
- _i13.RepositorySlug? slug,
- _i13.CreatePullRequest? request,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #create,
- [
- slug,
- request,
- ],
- ),
- returnValue: _i20.Future<_i13.PullRequest>.value(_FakePullRequest_41(
- this,
- Invocation.method(
- #create,
- [
- slug,
- request,
- ],
- ),
- )),
- ) as _i20.Future<_i13.PullRequest>);
-
- @override
- _i20.Future<_i13.PullRequest> edit(
- _i13.RepositorySlug? slug,
- int? number, {
- String? title,
- String? body,
- String? state,
- String? base,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #edit,
- [
- slug,
- number,
- ],
- {
- #title: title,
- #body: body,
- #state: state,
- #base: base,
- },
- ),
- returnValue: _i20.Future<_i13.PullRequest>.value(_FakePullRequest_41(
- this,
- Invocation.method(
- #edit,
- [
- slug,
- number,
- ],
- {
- #title: title,
- #body: body,
- #state: state,
- #base: base,
- },
- ),
- )),
- ) as _i20.Future<_i13.PullRequest>);
-
- @override
- _i20.Stream<_i13.RepositoryCommit> listCommits(
- _i13.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listCommits,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i20.Stream<_i13.RepositoryCommit>.empty(),
- ) as _i20.Stream<_i13.RepositoryCommit>);
-
- @override
- _i20.Stream<_i13.PullRequestFile> listFiles(
- _i13.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listFiles,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i20.Stream<_i13.PullRequestFile>.empty(),
- ) as _i20.Stream<_i13.PullRequestFile>);
-
- @override
- _i20.Stream<_i13.PullRequestReview> listReviews(
- _i13.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listReviews,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i20.Stream<_i13.PullRequestReview>.empty(),
- ) as _i20.Stream<_i13.PullRequestReview>);
-
- @override
- _i20.Future<bool> isMerged(
- _i13.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #isMerged,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<_i13.PullRequestMerge> merge(
- _i13.RepositorySlug? slug,
- int? number, {
- String? message,
- _i13.MergeMethod? mergeMethod = _i13.MergeMethod.merge,
- String? requestSha,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #merge,
- [
- slug,
- number,
- ],
- {
- #message: message,
- #mergeMethod: mergeMethod,
- #requestSha: requestSha,
- },
- ),
- returnValue: _i20.Future<_i13.PullRequestMerge>.value(_FakePullRequestMerge_70(
- this,
- Invocation.method(
- #merge,
- [
- slug,
- number,
- ],
- {
- #message: message,
- #mergeMethod: mergeMethod,
- #requestSha: requestSha,
- },
- ),
- )),
- ) as _i20.Future<_i13.PullRequestMerge>);
-
- @override
- _i20.Stream<_i13.PullRequestComment> listCommentsByPullRequest(
- _i13.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listCommentsByPullRequest,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i20.Stream<_i13.PullRequestComment>.empty(),
- ) as _i20.Stream<_i13.PullRequestComment>);
-
- @override
- _i20.Stream<_i13.PullRequestComment> listComments(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listComments,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.PullRequestComment>.empty(),
- ) as _i20.Stream<_i13.PullRequestComment>);
-
- @override
- _i20.Future<_i13.PullRequestComment> createComment(
- _i13.RepositorySlug? slug,
- int? number,
- _i13.CreatePullRequestComment? comment,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createComment,
- [
- slug,
- number,
- comment,
- ],
- ),
- returnValue: _i20.Future<_i13.PullRequestComment>.value(_FakePullRequestComment_71(
- this,
- Invocation.method(
- #createComment,
- [
- slug,
- number,
- comment,
- ],
- ),
- )),
- ) as _i20.Future<_i13.PullRequestComment>);
-
- @override
- _i20.Future<_i13.PullRequestReview> createReview(
- _i13.RepositorySlug? slug,
- _i13.CreatePullRequestReview? review,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createReview,
- [
- slug,
- review,
- ],
- ),
- returnValue: _i20.Future<_i13.PullRequestReview>.value(_FakePullRequestReview_72(
- this,
- Invocation.method(
- #createReview,
- [
- slug,
- review,
- ],
- ),
- )),
- ) as _i20.Future<_i13.PullRequestReview>);
-}
-
-/// A class which mocks [RepositoriesService].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockRepositoriesService extends _i1.Mock implements _i13.RepositoriesService {
- MockRepositoriesService() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i13.GitHub get github => (super.noSuchMethod(
- Invocation.getter(#github),
- returnValue: _FakeGitHub_16(
- this,
- Invocation.getter(#github),
- ),
- ) as _i13.GitHub);
-
- @override
- _i20.Stream<_i13.Repository> listRepositories({
- String? type = r'owner',
- String? sort = r'full_name',
- String? direction = r'asc',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listRepositories,
- [],
- {
- #type: type,
- #sort: sort,
- #direction: direction,
- },
- ),
- returnValue: _i20.Stream<_i13.Repository>.empty(),
- ) as _i20.Stream<_i13.Repository>);
-
- @override
- _i20.Stream<_i13.Repository> listUserRepositories(
- String? user, {
- String? type = r'owner',
- String? sort = r'full_name',
- String? direction = r'asc',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listUserRepositories,
- [user],
- {
- #type: type,
- #sort: sort,
- #direction: direction,
- },
- ),
- returnValue: _i20.Stream<_i13.Repository>.empty(),
- ) as _i20.Stream<_i13.Repository>);
-
- @override
- _i20.Stream<_i13.Repository> listOrganizationRepositories(
- String? org, {
- String? type = r'all',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listOrganizationRepositories,
- [org],
- {#type: type},
- ),
- returnValue: _i20.Stream<_i13.Repository>.empty(),
- ) as _i20.Stream<_i13.Repository>);
-
- @override
- _i20.Stream<_i13.Repository> listPublicRepositories({
- int? limit = 50,
- DateTime? since,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listPublicRepositories,
- [],
- {
- #limit: limit,
- #since: since,
- },
- ),
- returnValue: _i20.Stream<_i13.Repository>.empty(),
- ) as _i20.Stream<_i13.Repository>);
-
- @override
- _i20.Future<_i13.Repository> createRepository(
- _i13.CreateRepository? repository, {
- String? org,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createRepository,
- [repository],
- {#org: org},
- ),
- returnValue: _i20.Future<_i13.Repository>.value(_FakeRepository_73(
- this,
- Invocation.method(
- #createRepository,
- [repository],
- {#org: org},
- ),
- )),
- ) as _i20.Future<_i13.Repository>);
-
- @override
- _i20.Future<_i13.LicenseDetails> getLicense(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getLicense,
- [slug],
- ),
- returnValue: _i20.Future<_i13.LicenseDetails>.value(_FakeLicenseDetails_74(
- this,
- Invocation.method(
- #getLicense,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.LicenseDetails>);
-
- @override
- _i20.Future<_i13.Repository> getRepository(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getRepository,
- [slug],
- ),
- returnValue: _i20.Future<_i13.Repository>.value(_FakeRepository_73(
- this,
- Invocation.method(
- #getRepository,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.Repository>);
-
- @override
- _i20.Stream<_i13.Repository> getRepositories(List<_i13.RepositorySlug>? slugs) => (super.noSuchMethod(
- Invocation.method(
- #getRepositories,
- [slugs],
- ),
- returnValue: _i20.Stream<_i13.Repository>.empty(),
- ) as _i20.Stream<_i13.Repository>);
-
- @override
- _i20.Future<_i13.Repository> editRepository(
- _i13.RepositorySlug? slug, {
- String? name,
- String? description,
- String? homepage,
- bool? private,
- bool? hasIssues,
- bool? hasWiki,
- bool? hasDownloads,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editRepository,
- [slug],
- {
- #name: name,
- #description: description,
- #homepage: homepage,
- #private: private,
- #hasIssues: hasIssues,
- #hasWiki: hasWiki,
- #hasDownloads: hasDownloads,
- },
- ),
- returnValue: _i20.Future<_i13.Repository>.value(_FakeRepository_73(
- this,
- Invocation.method(
- #editRepository,
- [slug],
- {
- #name: name,
- #description: description,
- #homepage: homepage,
- #private: private,
- #hasIssues: hasIssues,
- #hasWiki: hasWiki,
- #hasDownloads: hasDownloads,
- },
- ),
- )),
- ) as _i20.Future<_i13.Repository>);
-
- @override
- _i20.Future<bool> deleteRepository(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #deleteRepository,
- [slug],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Stream<_i13.Contributor> listContributors(
- _i13.RepositorySlug? slug, {
- bool? anon = false,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listContributors,
- [slug],
- {#anon: anon},
- ),
- returnValue: _i20.Stream<_i13.Contributor>.empty(),
- ) as _i20.Stream<_i13.Contributor>);
-
- @override
- _i20.Stream<_i13.Team> listTeams(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listTeams,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.Team>.empty(),
- ) as _i20.Stream<_i13.Team>);
-
- @override
- _i20.Future<_i13.LanguageBreakdown> listLanguages(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listLanguages,
- [slug],
- ),
- returnValue: _i20.Future<_i13.LanguageBreakdown>.value(_FakeLanguageBreakdown_75(
- this,
- Invocation.method(
- #listLanguages,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.LanguageBreakdown>);
-
- @override
- _i20.Stream<_i13.Tag> listTags(
- _i13.RepositorySlug? slug, {
- int? page = 1,
- int? pages,
- int? perPage = 30,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listTags,
- [slug],
- {
- #page: page,
- #pages: pages,
- #perPage: perPage,
- },
- ),
- returnValue: _i20.Stream<_i13.Tag>.empty(),
- ) as _i20.Stream<_i13.Tag>);
-
- @override
- _i20.Stream<_i13.Branch> listBranches(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listBranches,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.Branch>.empty(),
- ) as _i20.Stream<_i13.Branch>);
-
- @override
- _i20.Future<_i13.Branch> getBranch(
- _i13.RepositorySlug? slug,
- String? branch,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getBranch,
- [
- slug,
- branch,
- ],
- ),
- returnValue: _i20.Future<_i13.Branch>.value(_FakeBranch_76(
- this,
- Invocation.method(
- #getBranch,
- [
- slug,
- branch,
- ],
- ),
- )),
- ) as _i20.Future<_i13.Branch>);
-
- @override
- _i20.Stream<_i13.Collaborator> listCollaborators(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCollaborators,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.Collaborator>.empty(),
- ) as _i20.Stream<_i13.Collaborator>);
-
- @override
- _i20.Future<bool> isCollaborator(
- _i13.RepositorySlug? slug,
- String? user,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #isCollaborator,
- [
- slug,
- user,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<bool> addCollaborator(
- _i13.RepositorySlug? slug,
- String? user,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #addCollaborator,
- [
- slug,
- user,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<bool> removeCollaborator(
- _i13.RepositorySlug? slug,
- String? user,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #removeCollaborator,
- [
- slug,
- user,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Stream<_i13.CommitComment> listSingleCommitComments(
- _i13.RepositorySlug? slug,
- _i13.RepositoryCommit? commit,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listSingleCommitComments,
- [
- slug,
- commit,
- ],
- ),
- returnValue: _i20.Stream<_i13.CommitComment>.empty(),
- ) as _i20.Stream<_i13.CommitComment>);
-
- @override
- _i20.Stream<_i13.CommitComment> listCommitComments(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCommitComments,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.CommitComment>.empty(),
- ) as _i20.Stream<_i13.CommitComment>);
-
- @override
- _i20.Future<_i13.CommitComment> createCommitComment(
- _i13.RepositorySlug? slug,
- _i13.RepositoryCommit? commit, {
- required String? body,
- String? path,
- int? position,
- int? line,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createCommitComment,
- [
- slug,
- commit,
- ],
- {
- #body: body,
- #path: path,
- #position: position,
- #line: line,
- },
- ),
- returnValue: _i20.Future<_i13.CommitComment>.value(_FakeCommitComment_77(
- this,
- Invocation.method(
- #createCommitComment,
- [
- slug,
- commit,
- ],
- {
- #body: body,
- #path: path,
- #position: position,
- #line: line,
- },
- ),
- )),
- ) as _i20.Future<_i13.CommitComment>);
-
- @override
- _i20.Future<_i13.CommitComment> getCommitComment(
- _i13.RepositorySlug? slug, {
- required int? id,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCommitComment,
- [slug],
- {#id: id},
- ),
- returnValue: _i20.Future<_i13.CommitComment>.value(_FakeCommitComment_77(
- this,
- Invocation.method(
- #getCommitComment,
- [slug],
- {#id: id},
- ),
- )),
- ) as _i20.Future<_i13.CommitComment>);
-
- @override
- _i20.Future<_i13.CommitComment> updateCommitComment(
- _i13.RepositorySlug? slug, {
- required int? id,
- required String? body,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #updateCommitComment,
- [slug],
- {
- #id: id,
- #body: body,
- },
- ),
- returnValue: _i20.Future<_i13.CommitComment>.value(_FakeCommitComment_77(
- this,
- Invocation.method(
- #updateCommitComment,
- [slug],
- {
- #id: id,
- #body: body,
- },
- ),
- )),
- ) as _i20.Future<_i13.CommitComment>);
-
- @override
- _i20.Future<bool> deleteCommitComment(
- _i13.RepositorySlug? slug, {
- required int? id,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteCommitComment,
- [slug],
- {#id: id},
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Stream<_i13.RepositoryCommit> listCommits(
- _i13.RepositorySlug? slug, {
- String? sha,
- String? path,
- String? author,
- String? committer,
- DateTime? since,
- DateTime? until,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listCommits,
- [slug],
- {
- #sha: sha,
- #path: path,
- #author: author,
- #committer: committer,
- #since: since,
- #until: until,
- },
- ),
- returnValue: _i20.Stream<_i13.RepositoryCommit>.empty(),
- ) as _i20.Stream<_i13.RepositoryCommit>);
-
- @override
- _i20.Future<_i13.RepositoryCommit> getCommit(
- _i13.RepositorySlug? slug,
- String? sha,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCommit,
- [
- slug,
- sha,
- ],
- ),
- returnValue: _i20.Future<_i13.RepositoryCommit>.value(_FakeRepositoryCommit_78(
- this,
- Invocation.method(
- #getCommit,
- [
- slug,
- sha,
- ],
- ),
- )),
- ) as _i20.Future<_i13.RepositoryCommit>);
-
- @override
- _i20.Future<String> getCommitDiff(
- _i13.RepositorySlug? slug,
- String? sha,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCommitDiff,
- [
- slug,
- sha,
- ],
- ),
- returnValue: _i20.Future<String>.value(_i32.dummyValue<String>(
- this,
- Invocation.method(
- #getCommitDiff,
- [
- slug,
- sha,
- ],
- ),
- )),
- ) as _i20.Future<String>);
-
- @override
- _i20.Future<_i13.GitHubComparison> compareCommits(
- _i13.RepositorySlug? slug,
- String? refBase,
- String? refHead,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #compareCommits,
- [
- slug,
- refBase,
- refHead,
- ],
- ),
- returnValue: _i20.Future<_i13.GitHubComparison>.value(_FakeGitHubComparison_79(
- this,
- Invocation.method(
- #compareCommits,
- [
- slug,
- refBase,
- refHead,
- ],
- ),
- )),
- ) as _i20.Future<_i13.GitHubComparison>);
-
- @override
- _i20.Future<_i13.GitHubFile> getReadme(
- _i13.RepositorySlug? slug, {
- String? ref,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReadme,
- [slug],
- {#ref: ref},
- ),
- returnValue: _i20.Future<_i13.GitHubFile>.value(_FakeGitHubFile_80(
- this,
- Invocation.method(
- #getReadme,
- [slug],
- {#ref: ref},
- ),
- )),
- ) as _i20.Future<_i13.GitHubFile>);
-
- @override
- _i20.Future<_i13.RepositoryContents> getContents(
- _i13.RepositorySlug? slug,
- String? path, {
- String? ref,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getContents,
- [
- slug,
- path,
- ],
- {#ref: ref},
- ),
- returnValue: _i20.Future<_i13.RepositoryContents>.value(_FakeRepositoryContents_81(
- this,
- Invocation.method(
- #getContents,
- [
- slug,
- path,
- ],
- {#ref: ref},
- ),
- )),
- ) as _i20.Future<_i13.RepositoryContents>);
-
- @override
- _i20.Future<_i13.ContentCreation> createFile(
- _i13.RepositorySlug? slug,
- _i13.CreateFile? file,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createFile,
- [
- slug,
- file,
- ],
- ),
- returnValue: _i20.Future<_i13.ContentCreation>.value(_FakeContentCreation_82(
- this,
- Invocation.method(
- #createFile,
- [
- slug,
- file,
- ],
- ),
- )),
- ) as _i20.Future<_i13.ContentCreation>);
-
- @override
- _i20.Future<_i13.ContentCreation> updateFile(
- _i13.RepositorySlug? slug,
- String? path,
- String? message,
- String? content,
- String? sha, {
- String? branch,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #updateFile,
- [
- slug,
- path,
- message,
- content,
- sha,
- ],
- {#branch: branch},
- ),
- returnValue: _i20.Future<_i13.ContentCreation>.value(_FakeContentCreation_82(
- this,
- Invocation.method(
- #updateFile,
- [
- slug,
- path,
- message,
- content,
- sha,
- ],
- {#branch: branch},
- ),
- )),
- ) as _i20.Future<_i13.ContentCreation>);
-
- @override
- _i20.Future<_i13.ContentCreation> deleteFile(
- _i13.RepositorySlug? slug,
- String? path,
- String? message,
- String? sha,
- String? branch,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteFile,
- [
- slug,
- path,
- message,
- sha,
- branch,
- ],
- ),
- returnValue: _i20.Future<_i13.ContentCreation>.value(_FakeContentCreation_82(
- this,
- Invocation.method(
- #deleteFile,
- [
- slug,
- path,
- message,
- sha,
- branch,
- ],
- ),
- )),
- ) as _i20.Future<_i13.ContentCreation>);
-
- @override
- _i20.Future<String?> getArchiveLink(
- _i13.RepositorySlug? slug,
- String? ref, {
- String? format = r'tarball',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getArchiveLink,
- [
- slug,
- ref,
- ],
- {#format: format},
- ),
- returnValue: _i20.Future<String?>.value(),
- ) as _i20.Future<String?>);
-
- @override
- _i20.Stream<_i13.Repository> listForks(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listForks,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.Repository>.empty(),
- ) as _i20.Stream<_i13.Repository>);
-
- @override
- _i20.Future<_i13.Repository> createFork(
- _i13.RepositorySlug? slug, [
- _i13.CreateFork? fork,
- ]) =>
- (super.noSuchMethod(
- Invocation.method(
- #createFork,
- [
- slug,
- fork,
- ],
- ),
- returnValue: _i20.Future<_i13.Repository>.value(_FakeRepository_73(
- this,
- Invocation.method(
- #createFork,
- [
- slug,
- fork,
- ],
- ),
- )),
- ) as _i20.Future<_i13.Repository>);
-
- @override
- _i20.Stream<_i13.Hook> listHooks(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listHooks,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.Hook>.empty(),
- ) as _i20.Stream<_i13.Hook>);
-
- @override
- _i20.Future<_i13.Hook> getHook(
- _i13.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i20.Future<_i13.Hook>.value(_FakeHook_83(
- this,
- Invocation.method(
- #getHook,
- [
- slug,
- id,
- ],
- ),
- )),
- ) as _i20.Future<_i13.Hook>);
-
- @override
- _i20.Future<_i13.Hook> createHook(
- _i13.RepositorySlug? slug,
- _i13.CreateHook? hook,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createHook,
- [
- slug,
- hook,
- ],
- ),
- returnValue: _i20.Future<_i13.Hook>.value(_FakeHook_83(
- this,
- Invocation.method(
- #createHook,
- [
- slug,
- hook,
- ],
- ),
- )),
- ) as _i20.Future<_i13.Hook>);
-
- @override
- _i20.Future<_i13.Hook> editHook(
- _i13.RepositorySlug? slug,
- _i13.Hook? hookToEdit, {
- String? configUrl,
- String? configContentType,
- String? configSecret,
- bool? configInsecureSsl,
- List<String>? events,
- List<String>? addEvents,
- List<String>? removeEvents,
- bool? active,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editHook,
- [
- slug,
- hookToEdit,
- ],
- {
- #configUrl: configUrl,
- #configContentType: configContentType,
- #configSecret: configSecret,
- #configInsecureSsl: configInsecureSsl,
- #events: events,
- #addEvents: addEvents,
- #removeEvents: removeEvents,
- #active: active,
- },
- ),
- returnValue: _i20.Future<_i13.Hook>.value(_FakeHook_83(
- this,
- Invocation.method(
- #editHook,
- [
- slug,
- hookToEdit,
- ],
- {
- #configUrl: configUrl,
- #configContentType: configContentType,
- #configSecret: configSecret,
- #configInsecureSsl: configInsecureSsl,
- #events: events,
- #addEvents: addEvents,
- #removeEvents: removeEvents,
- #active: active,
- },
- ),
- )),
- ) as _i20.Future<_i13.Hook>);
-
- @override
- _i20.Future<bool> testPushHook(
- _i13.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #testPushHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<bool> pingHook(
- _i13.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #pingHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<bool> deleteHook(
- _i13.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Stream<_i13.PublicKey> listDeployKeys(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listDeployKeys,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.PublicKey>.empty(),
- ) as _i20.Stream<_i13.PublicKey>);
-
- @override
- _i20.Future<_i13.PublicKey> getDeployKey(
- _i13.RepositorySlug? slug, {
- required int? id,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getDeployKey,
- [slug],
- {#id: id},
- ),
- returnValue: _i20.Future<_i13.PublicKey>.value(_FakePublicKey_84(
- this,
- Invocation.method(
- #getDeployKey,
- [slug],
- {#id: id},
- ),
- )),
- ) as _i20.Future<_i13.PublicKey>);
-
- @override
- _i20.Future<_i13.PublicKey> createDeployKey(
- _i13.RepositorySlug? slug,
- _i13.CreatePublicKey? key,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createDeployKey,
- [
- slug,
- key,
- ],
- ),
- returnValue: _i20.Future<_i13.PublicKey>.value(_FakePublicKey_84(
- this,
- Invocation.method(
- #createDeployKey,
- [
- slug,
- key,
- ],
- ),
- )),
- ) as _i20.Future<_i13.PublicKey>);
-
- @override
- _i20.Future<bool> deleteDeployKey({
- required _i13.RepositorySlug? slug,
- required _i13.PublicKey? key,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteDeployKey,
- [],
- {
- #slug: slug,
- #key: key,
- },
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<_i13.RepositoryCommit> merge(
- _i13.RepositorySlug? slug,
- _i13.CreateMerge? merge,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #merge,
- [
- slug,
- merge,
- ],
- ),
- returnValue: _i20.Future<_i13.RepositoryCommit>.value(_FakeRepositoryCommit_78(
- this,
- Invocation.method(
- #merge,
- [
- slug,
- merge,
- ],
- ),
- )),
- ) as _i20.Future<_i13.RepositoryCommit>);
-
- @override
- _i20.Future<_i13.RepositoryPages> getPagesInfo(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getPagesInfo,
- [slug],
- ),
- returnValue: _i20.Future<_i13.RepositoryPages>.value(_FakeRepositoryPages_85(
- this,
- Invocation.method(
- #getPagesInfo,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.RepositoryPages>);
-
- @override
- _i20.Stream<_i13.PageBuild> listPagesBuilds(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listPagesBuilds,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.PageBuild>.empty(),
- ) as _i20.Stream<_i13.PageBuild>);
-
- @override
- _i20.Future<_i13.PageBuild> getLatestPagesBuild(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getLatestPagesBuild,
- [slug],
- ),
- returnValue: _i20.Future<_i13.PageBuild>.value(_FakePageBuild_86(
- this,
- Invocation.method(
- #getLatestPagesBuild,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.PageBuild>);
-
- @override
- _i20.Stream<_i13.Release> listReleases(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listReleases,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.Release>.empty(),
- ) as _i20.Stream<_i13.Release>);
-
- @override
- _i20.Future<_i13.Release> getLatestRelease(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getLatestRelease,
- [slug],
- ),
- returnValue: _i20.Future<_i13.Release>.value(_FakeRelease_87(
- this,
- Invocation.method(
- #getLatestRelease,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.Release>);
-
- @override
- _i20.Future<_i13.Release> getReleaseById(
- _i13.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReleaseById,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i20.Future<_i13.Release>.value(_FakeRelease_87(
- this,
- Invocation.method(
- #getReleaseById,
- [
- slug,
- id,
- ],
- ),
- )),
- ) as _i20.Future<_i13.Release>);
-
- @override
- _i20.Future<_i13.Release> getReleaseByTagName(
- _i13.RepositorySlug? slug,
- String? tagName,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReleaseByTagName,
- [
- slug,
- tagName,
- ],
- ),
- returnValue: _i20.Future<_i13.Release>.value(_FakeRelease_87(
- this,
- Invocation.method(
- #getReleaseByTagName,
- [
- slug,
- tagName,
- ],
- ),
- )),
- ) as _i20.Future<_i13.Release>);
-
- @override
- _i20.Future<_i13.Release> createRelease(
- _i13.RepositorySlug? slug,
- _i13.CreateRelease? createRelease, {
- bool? getIfExists = true,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createRelease,
- [
- slug,
- createRelease,
- ],
- {#getIfExists: getIfExists},
- ),
- returnValue: _i20.Future<_i13.Release>.value(_FakeRelease_87(
- this,
- Invocation.method(
- #createRelease,
- [
- slug,
- createRelease,
- ],
- {#getIfExists: getIfExists},
- ),
- )),
- ) as _i20.Future<_i13.Release>);
-
- @override
- _i20.Future<_i13.Release> editRelease(
- _i13.RepositorySlug? slug,
- _i13.Release? releaseToEdit, {
- String? tagName,
- String? targetCommitish,
- String? name,
- String? body,
- bool? draft,
- bool? preRelease,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editRelease,
- [
- slug,
- releaseToEdit,
- ],
- {
- #tagName: tagName,
- #targetCommitish: targetCommitish,
- #name: name,
- #body: body,
- #draft: draft,
- #preRelease: preRelease,
- },
- ),
- returnValue: _i20.Future<_i13.Release>.value(_FakeRelease_87(
- this,
- Invocation.method(
- #editRelease,
- [
- slug,
- releaseToEdit,
- ],
- {
- #tagName: tagName,
- #targetCommitish: targetCommitish,
- #name: name,
- #body: body,
- #draft: draft,
- #preRelease: preRelease,
- },
- ),
- )),
- ) as _i20.Future<_i13.Release>);
-
- @override
- _i20.Future<bool> deleteRelease(
- _i13.RepositorySlug? slug,
- _i13.Release? release,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteRelease,
- [
- slug,
- release,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Stream<_i13.ReleaseAsset> listReleaseAssets(
- _i13.RepositorySlug? slug,
- _i13.Release? release,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listReleaseAssets,
- [
- slug,
- release,
- ],
- ),
- returnValue: _i20.Stream<_i13.ReleaseAsset>.empty(),
- ) as _i20.Stream<_i13.ReleaseAsset>);
-
- @override
- _i20.Future<_i13.ReleaseAsset> getReleaseAsset(
- _i13.RepositorySlug? slug,
- _i13.Release? release, {
- required int? assetId,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReleaseAsset,
- [
- slug,
- release,
- ],
- {#assetId: assetId},
- ),
- returnValue: _i20.Future<_i13.ReleaseAsset>.value(_FakeReleaseAsset_88(
- this,
- Invocation.method(
- #getReleaseAsset,
- [
- slug,
- release,
- ],
- {#assetId: assetId},
- ),
- )),
- ) as _i20.Future<_i13.ReleaseAsset>);
-
- @override
- _i20.Future<_i13.ReleaseAsset> editReleaseAsset(
- _i13.RepositorySlug? slug,
- _i13.ReleaseAsset? assetToEdit, {
- String? name,
- String? label,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editReleaseAsset,
- [
- slug,
- assetToEdit,
- ],
- {
- #name: name,
- #label: label,
- },
- ),
- returnValue: _i20.Future<_i13.ReleaseAsset>.value(_FakeReleaseAsset_88(
- this,
- Invocation.method(
- #editReleaseAsset,
- [
- slug,
- assetToEdit,
- ],
- {
- #name: name,
- #label: label,
- },
- ),
- )),
- ) as _i20.Future<_i13.ReleaseAsset>);
-
- @override
- _i20.Future<bool> deleteReleaseAsset(
- _i13.RepositorySlug? slug,
- _i13.ReleaseAsset? asset,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteReleaseAsset,
- [
- slug,
- asset,
- ],
- ),
- returnValue: _i20.Future<bool>.value(false),
- ) as _i20.Future<bool>);
-
- @override
- _i20.Future<List<_i13.ReleaseAsset>> uploadReleaseAssets(
- _i13.Release? release,
- Iterable<_i13.CreateReleaseAsset>? createReleaseAssets,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #uploadReleaseAssets,
- [
- release,
- createReleaseAssets,
- ],
- ),
- returnValue: _i20.Future<List<_i13.ReleaseAsset>>.value(<_i13.ReleaseAsset>[]),
- ) as _i20.Future<List<_i13.ReleaseAsset>>);
-
- @override
- _i20.Future<List<_i13.ContributorStatistics>> listContributorStats(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listContributorStats,
- [slug],
- ),
- returnValue: _i20.Future<List<_i13.ContributorStatistics>>.value(<_i13.ContributorStatistics>[]),
- ) as _i20.Future<List<_i13.ContributorStatistics>>);
-
- @override
- _i20.Stream<_i13.YearCommitCountWeek> listCommitActivity(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCommitActivity,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.YearCommitCountWeek>.empty(),
- ) as _i20.Stream<_i13.YearCommitCountWeek>);
-
- @override
- _i20.Stream<_i13.WeeklyChangesCount> listCodeFrequency(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCodeFrequency,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.WeeklyChangesCount>.empty(),
- ) as _i20.Stream<_i13.WeeklyChangesCount>);
-
- @override
- _i20.Future<_i13.ContributorParticipation> getParticipation(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getParticipation,
- [slug],
- ),
- returnValue: _i20.Future<_i13.ContributorParticipation>.value(_FakeContributorParticipation_89(
- this,
- Invocation.method(
- #getParticipation,
- [slug],
- ),
- )),
- ) as _i20.Future<_i13.ContributorParticipation>);
-
- @override
- _i20.Stream<_i13.PunchcardEntry> listPunchcard(_i13.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listPunchcard,
- [slug],
- ),
- returnValue: _i20.Stream<_i13.PunchcardEntry>.empty(),
- ) as _i20.Stream<_i13.PunchcardEntry>);
-
- @override
- _i20.Stream<_i13.RepositoryStatus> listStatuses(
- _i13.RepositorySlug? slug,
- String? ref,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listStatuses,
- [
- slug,
- ref,
- ],
- ),
- returnValue: _i20.Stream<_i13.RepositoryStatus>.empty(),
- ) as _i20.Stream<_i13.RepositoryStatus>);
-
- @override
- _i20.Future<_i13.RepositoryStatus> createStatus(
- _i13.RepositorySlug? slug,
- String? ref,
- _i13.CreateStatus? request,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createStatus,
- [
- slug,
- ref,
- request,
- ],
- ),
- returnValue: _i20.Future<_i13.RepositoryStatus>.value(_FakeRepositoryStatus_90(
- this,
- Invocation.method(
- #createStatus,
- [
- slug,
- ref,
- request,
- ],
- ),
- )),
- ) as _i20.Future<_i13.RepositoryStatus>);
-
- @override
- _i20.Future<_i13.CombinedRepositoryStatus> getCombinedStatus(
- _i13.RepositorySlug? slug,
- String? ref,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCombinedStatus,
- [
- slug,
- ref,
- ],
- ),
- returnValue: _i20.Future<_i13.CombinedRepositoryStatus>.value(_FakeCombinedRepositoryStatus_91(
- this,
- Invocation.method(
- #getCombinedStatus,
- [
- slug,
- ref,
- ],
- ),
- )),
- ) as _i20.Future<_i13.CombinedRepositoryStatus>);
-
- @override
- _i20.Future<_i13.ReleaseNotes> generateReleaseNotes(_i13.CreateReleaseNotes? crn) => (super.noSuchMethod(
- Invocation.method(
- #generateReleaseNotes,
- [crn],
- ),
- returnValue: _i20.Future<_i13.ReleaseNotes>.value(_FakeReleaseNotes_92(
- this,
- Invocation.method(
- #generateReleaseNotes,
- [crn],
- ),
- )),
- ) as _i20.Future<_i13.ReleaseNotes>);
-}
-
/// A class which mocks [SearchService].
///
/// See the documentation for Mockito's code generation for more information.
@@ -9000,14 +6479,14 @@
/// A class which mocks [TabledataResource].
///
/// See the documentation for Mockito's code generation for more information.
-class MockTabledataResource extends _i1.Mock implements _i6.TabledataResource {
+class MockTabledataResource extends _i1.Mock implements _i5.TabledataResource {
MockTabledataResource() {
_i1.throwOnMissingStub(this);
}
@override
- _i20.Future<_i6.TableDataInsertAllResponse> insertAll(
- _i6.TableDataInsertAllRequest? request,
+ _i20.Future<_i5.TableDataInsertAllResponse> insertAll(
+ _i5.TableDataInsertAllRequest? request,
String? projectId,
String? datasetId,
String? tableId, {
@@ -9024,7 +6503,7 @@
],
{#$fields: $fields},
),
- returnValue: _i20.Future<_i6.TableDataInsertAllResponse>.value(_FakeTableDataInsertAllResponse_93(
+ returnValue: _i20.Future<_i5.TableDataInsertAllResponse>.value(_FakeTableDataInsertAllResponse_65(
this,
Invocation.method(
#insertAll,
@@ -9037,13 +6516,14 @@
{#$fields: $fields},
),
)),
- ) as _i20.Future<_i6.TableDataInsertAllResponse>);
+ ) as _i20.Future<_i5.TableDataInsertAllResponse>);
@override
- _i20.Future<_i6.TableDataList> list(
+ _i20.Future<_i5.TableDataList> list(
String? projectId,
String? datasetId,
String? tableId, {
+ bool? formatOptions_useInt64Timestamp,
int? maxResults,
String? pageToken,
String? selectedFields,
@@ -9059,6 +6539,7 @@
tableId,
],
{
+ #formatOptions_useInt64Timestamp: formatOptions_useInt64Timestamp,
#maxResults: maxResults,
#pageToken: pageToken,
#selectedFields: selectedFields,
@@ -9066,7 +6547,7 @@
#$fields: $fields,
},
),
- returnValue: _i20.Future<_i6.TableDataList>.value(_FakeTableDataList_94(
+ returnValue: _i20.Future<_i5.TableDataList>.value(_FakeTableDataList_66(
this,
Invocation.method(
#list,
@@ -9076,6 +6557,7 @@
tableId,
],
{
+ #formatOptions_useInt64Timestamp: formatOptions_useInt64Timestamp,
#maxResults: maxResults,
#pageToken: pageToken,
#selectedFields: selectedFields,
@@ -9084,7 +6566,7 @@
},
),
)),
- ) as _i20.Future<_i6.TableDataList>);
+ ) as _i20.Future<_i5.TableDataList>);
}
/// A class which mocks [UsersService].
@@ -9110,7 +6592,7 @@
#getUser,
[name],
),
- returnValue: _i20.Future<_i13.User>.value(_FakeUser_95(
+ returnValue: _i20.Future<_i13.User>.value(_FakeUser_67(
this,
Invocation.method(
#getUser,
@@ -9143,7 +6625,7 @@
#bio: bio,
},
),
- returnValue: _i20.Future<_i13.CurrentUser>.value(_FakeCurrentUser_96(
+ returnValue: _i20.Future<_i13.CurrentUser>.value(_FakeCurrentUser_68(
this,
Invocation.method(
#editCurrentUser,
@@ -9181,7 +6663,7 @@
#getCurrentUser,
[],
),
- returnValue: _i20.Future<_i13.CurrentUser>.value(_FakeCurrentUser_96(
+ returnValue: _i20.Future<_i13.CurrentUser>.value(_FakeCurrentUser_68(
this,
Invocation.method(
#getCurrentUser,
@@ -9328,7 +6810,7 @@
#createPublicKey,
[key],
),
- returnValue: _i20.Future<_i13.PublicKey>.value(_FakePublicKey_84(
+ returnValue: _i20.Future<_i13.PublicKey>.value(_FakePublicKey_69(
this,
Invocation.method(
#createPublicKey,
@@ -9408,7 +6890,7 @@
],
{#$fields: $fields},
),
- returnValue: _i20.Future<_i21.BeginTransactionResponse>.value(_FakeBeginTransactionResponse_97(
+ returnValue: _i20.Future<_i21.BeginTransactionResponse>.value(_FakeBeginTransactionResponse_70(
this,
Invocation.method(
#beginTransaction,
@@ -9507,7 +6989,7 @@
#$fields: $fields,
},
),
- returnValue: _i20.Future<_i27.$Empty>.value(_Fake$Empty_98(
+ returnValue: _i20.Future<_i27.$Empty>.value(_Fake$Empty_71(
this,
Invocation.method(
#delete,
@@ -9586,7 +7068,7 @@
#$fields: $fields,
},
),
- returnValue: _i20.Future<_i21.ListDocumentsResponse>.value(_FakeListDocumentsResponse_99(
+ returnValue: _i20.Future<_i21.ListDocumentsResponse>.value(_FakeListDocumentsResponse_72(
this,
Invocation.method(
#list,
@@ -9623,7 +7105,7 @@
],
{#$fields: $fields},
),
- returnValue: _i20.Future<_i21.ListCollectionIdsResponse>.value(_FakeListCollectionIdsResponse_100(
+ returnValue: _i20.Future<_i21.ListCollectionIdsResponse>.value(_FakeListCollectionIdsResponse_73(
this,
Invocation.method(
#listCollectionIds,
@@ -9667,7 +7149,7 @@
#$fields: $fields,
},
),
- returnValue: _i20.Future<_i21.ListDocumentsResponse>.value(_FakeListDocumentsResponse_99(
+ returnValue: _i20.Future<_i21.ListDocumentsResponse>.value(_FakeListDocumentsResponse_72(
this,
Invocation.method(
#listDocuments,
@@ -9704,7 +7186,7 @@
],
{#$fields: $fields},
),
- returnValue: _i20.Future<_i21.PartitionQueryResponse>.value(_FakePartitionQueryResponse_101(
+ returnValue: _i20.Future<_i21.PartitionQueryResponse>.value(_FakePartitionQueryResponse_74(
this,
Invocation.method(
#partitionQuery,
@@ -9776,7 +7258,7 @@
],
{#$fields: $fields},
),
- returnValue: _i20.Future<_i27.$Empty>.value(_Fake$Empty_98(
+ returnValue: _i20.Future<_i27.$Empty>.value(_Fake$Empty_71(
this,
Invocation.method(
#rollback,
@@ -9841,7 +7323,7 @@
],
{#$fields: $fields},
),
- returnValue: _i20.Future<_i21.WriteResponse>.value(_FakeWriteResponse_102(
+ returnValue: _i20.Future<_i21.WriteResponse>.value(_FakeWriteResponse_75(
this,
Invocation.method(
#write,
@@ -9927,7 +7409,7 @@
#conclusion: conclusion,
},
),
- returnValue: _i20.Future<_i28.StagingConclusion>.value(_FakeStagingConclusion_103(
+ returnValue: _i20.Future<_i28.StagingConclusion>.value(_FakeStagingConclusion_76(
this,
Invocation.method(
#markCheckRunConclusion,
@@ -10056,7 +7538,7 @@
#[],
[key],
),
- returnValue: _FakeEntry_104<_i40.Uint8List>(
+ returnValue: _FakeEntry_77<_i40.Uint8List>(
this,
Invocation.method(
#[],
@@ -10071,7 +7553,7 @@
#withPrefix,
[prefix],
),
- returnValue: _FakeCache_105<_i40.Uint8List>(
+ returnValue: _FakeCache_78<_i40.Uint8List>(
this,
Invocation.method(
#withPrefix,
@@ -10086,7 +7568,7 @@
#withCodec,
[codec],
),
- returnValue: _FakeCache_105<S>(
+ returnValue: _FakeCache_78<S>(
this,
Invocation.method(
#withCodec,
@@ -10101,7 +7583,7 @@
#withTTL,
[ttl],
),
- returnValue: _FakeCache_105<_i40.Uint8List>(
+ returnValue: _FakeCache_78<_i40.Uint8List>(
this,
Invocation.method(
#withTTL,
@@ -10110,530 +7592,3 @@
),
) as _i29.Cache<_i40.Uint8List>);
}
-
-/// A class which mocks [GitHub].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockGitHub extends _i1.Mock implements _i13.GitHub {
- MockGitHub() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i13.Authentication get auth => (super.noSuchMethod(
- Invocation.getter(#auth),
- returnValue: _FakeAuthentication_106(
- this,
- Invocation.getter(#auth),
- ),
- ) as _i13.Authentication);
-
- @override
- set auth(_i13.Authentication? _auth) => super.noSuchMethod(
- Invocation.setter(
- #auth,
- _auth,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- String get endpoint => (super.noSuchMethod(
- Invocation.getter(#endpoint),
- returnValue: _i32.dummyValue<String>(
- this,
- Invocation.getter(#endpoint),
- ),
- ) as String);
-
- @override
- String get version => (super.noSuchMethod(
- Invocation.getter(#version),
- returnValue: _i32.dummyValue<String>(
- this,
- Invocation.getter(#version),
- ),
- ) as String);
-
- @override
- _i2.Client get client => (super.noSuchMethod(
- Invocation.getter(#client),
- returnValue: _FakeClient_0(
- this,
- Invocation.getter(#client),
- ),
- ) as _i2.Client);
-
- @override
- _i13.ActivityService get activity => (super.noSuchMethod(
- Invocation.getter(#activity),
- returnValue: _FakeActivityService_107(
- this,
- Invocation.getter(#activity),
- ),
- ) as _i13.ActivityService);
-
- @override
- _i13.AuthorizationsService get authorizations => (super.noSuchMethod(
- Invocation.getter(#authorizations),
- returnValue: _FakeAuthorizationsService_108(
- this,
- Invocation.getter(#authorizations),
- ),
- ) as _i13.AuthorizationsService);
-
- @override
- _i13.GistsService get gists => (super.noSuchMethod(
- Invocation.getter(#gists),
- returnValue: _FakeGistsService_109(
- this,
- Invocation.getter(#gists),
- ),
- ) as _i13.GistsService);
-
- @override
- _i13.GitService get git => (super.noSuchMethod(
- Invocation.getter(#git),
- returnValue: _FakeGitService_110(
- this,
- Invocation.getter(#git),
- ),
- ) as _i13.GitService);
-
- @override
- _i13.IssuesService get issues => (super.noSuchMethod(
- Invocation.getter(#issues),
- returnValue: _FakeIssuesService_111(
- this,
- Invocation.getter(#issues),
- ),
- ) as _i13.IssuesService);
-
- @override
- _i13.MiscService get misc => (super.noSuchMethod(
- Invocation.getter(#misc),
- returnValue: _FakeMiscService_112(
- this,
- Invocation.getter(#misc),
- ),
- ) as _i13.MiscService);
-
- @override
- _i13.OrganizationsService get organizations => (super.noSuchMethod(
- Invocation.getter(#organizations),
- returnValue: _FakeOrganizationsService_113(
- this,
- Invocation.getter(#organizations),
- ),
- ) as _i13.OrganizationsService);
-
- @override
- _i13.PullRequestsService get pullRequests => (super.noSuchMethod(
- Invocation.getter(#pullRequests),
- returnValue: _FakePullRequestsService_114(
- this,
- Invocation.getter(#pullRequests),
- ),
- ) as _i13.PullRequestsService);
-
- @override
- _i13.RepositoriesService get repositories => (super.noSuchMethod(
- Invocation.getter(#repositories),
- returnValue: _FakeRepositoriesService_115(
- this,
- Invocation.getter(#repositories),
- ),
- ) as _i13.RepositoriesService);
-
- @override
- _i13.SearchService get search => (super.noSuchMethod(
- Invocation.getter(#search),
- returnValue: _FakeSearchService_116(
- this,
- Invocation.getter(#search),
- ),
- ) as _i13.SearchService);
-
- @override
- _i13.UrlShortenerService get urlShortener => (super.noSuchMethod(
- Invocation.getter(#urlShortener),
- returnValue: _FakeUrlShortenerService_117(
- this,
- Invocation.getter(#urlShortener),
- ),
- ) as _i13.UrlShortenerService);
-
- @override
- _i13.UsersService get users => (super.noSuchMethod(
- Invocation.getter(#users),
- returnValue: _FakeUsersService_118(
- this,
- Invocation.getter(#users),
- ),
- ) as _i13.UsersService);
-
- @override
- _i13.ChecksService get checks => (super.noSuchMethod(
- Invocation.getter(#checks),
- returnValue: _FakeChecksService_119(
- this,
- Invocation.getter(#checks),
- ),
- ) as _i13.ChecksService);
-
- @override
- _i20.Future<T> getJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, String>? params,
- _i13.JSONConverter<S, T>? convert,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #preview: preview,
- },
- ),
- returnValue: _i32.ifNotNull(
- _i32.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #getJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i20.Future<T>.value(v),
- ) ??
- _FakeFuture_23<T>(
- this,
- Invocation.method(
- #getJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #preview: preview,
- },
- ),
- ),
- ) as _i20.Future<T>);
-
- @override
- _i20.Future<T> postJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i13.JSONConverter<S, T>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #postJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i47.postJsonShim<S, T>(
- path,
- statusCode: statusCode,
- fail: fail,
- headers: headers,
- params: params,
- convert: convert,
- body: body,
- preview: preview,
- ),
- ) as _i20.Future<T>);
-
- @override
- _i20.Future<T> putJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i13.JSONConverter<S, T>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #putJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i32.ifNotNull(
- _i32.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #putJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i20.Future<T>.value(v),
- ) ??
- _FakeFuture_23<T>(
- this,
- Invocation.method(
- #putJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i20.Future<T>);
-
- @override
- _i20.Future<T> patchJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i13.JSONConverter<S, T>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #patchJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i32.ifNotNull(
- _i32.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #patchJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i20.Future<T>.value(v),
- ) ??
- _FakeFuture_23<T>(
- this,
- Invocation.method(
- #patchJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i20.Future<T>);
-
- @override
- _i20.Future<T> requestJson<S, T>(
- String? method,
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i13.JSONConverter<S, T?>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #requestJson,
- [
- method,
- path,
- ],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i32.ifNotNull(
- _i32.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #requestJson,
- [
- method,
- path,
- ],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i20.Future<T>.value(v),
- ) ??
- _FakeFuture_23<T>(
- this,
- Invocation.method(
- #requestJson,
- [
- method,
- path,
- ],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i20.Future<T>);
-
- @override
- _i20.Future<_i2.Response> request(
- String? method,
- String? path, {
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- dynamic body,
- int? statusCode,
- void Function(_i2.Response)? fail,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #request,
- [
- method,
- path,
- ],
- {
- #headers: headers,
- #params: params,
- #body: body,
- #statusCode: statusCode,
- #fail: fail,
- #preview: preview,
- },
- ),
- returnValue: _i20.Future<_i2.Response>.value(_FakeResponse_120(
- this,
- Invocation.method(
- #request,
- [
- method,
- path,
- ],
- {
- #headers: headers,
- #params: params,
- #body: body,
- #statusCode: statusCode,
- #fail: fail,
- #preview: preview,
- },
- ),
- )),
- ) as _i20.Future<_i2.Response>);
-
- @override
- Never handleStatusCode(_i2.Response? response) => (super.noSuchMethod(
- Invocation.method(
- #handleStatusCode,
- [response],
- ),
- returnValue: null,
- ) as Never);
-
- @override
- void dispose() => super.noSuchMethod(
- Invocation.method(
- #dispose,
- [],
- ),
- returnValueForMissingStub: null,
- );
-}
diff --git a/auto_submit/lib/exception/bigquery_exception.dart b/auto_submit/lib/exception/bigquery_exception.dart
deleted file mode 100644
index 2c79f63..0000000
--- a/auto_submit/lib/exception/bigquery_exception.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2022 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-class BigQueryException implements Exception {
- /// Create a custom exception for Big Query Errors.
- BigQueryException(this.cause);
-
- final String cause;
-
- @override
- String toString() => cause;
-}
diff --git a/auto_submit/lib/model/discord_message.g.dart b/auto_submit/lib/model/discord_message.g.dart
index ef12add..2b430d6 100644
--- a/auto_submit/lib/model/discord_message.g.dart
+++ b/auto_submit/lib/model/discord_message.g.dart
@@ -12,18 +12,8 @@
avatarUrl: json['avatar_url'] as String?,
);
-Map<String, dynamic> _$MessageToJson(Message instance) {
- final val = <String, dynamic>{
- 'content': instance.content,
- 'username': instance.username,
- };
-
- void writeNotNull(String key, dynamic value) {
- if (value != null) {
- val[key] = value;
- }
- }
-
- writeNotNull('avatar_url', instance.avatarUrl);
- return val;
-}
+Map<String, dynamic> _$MessageToJson(Message instance) => <String, dynamic>{
+ 'content': instance.content,
+ 'username': instance.username,
+ if (instance.avatarUrl case final value?) 'avatar_url': value,
+ };
diff --git a/auto_submit/lib/service/access_client_provider.dart b/auto_submit/lib/service/access_client_provider.dart
deleted file mode 100644
index eb60463..0000000
--- a/auto_submit/lib/service/access_client_provider.dart
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2022 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'package:googleapis_auth/auth_io.dart';
-import 'package:http/http.dart';
-
-class AccessClientProvider {
- /// Returns an OAuth 2.0 authenticated access client for the device lab service account.
- Future<Client> createAccessClient({
- List<String> scopes = const <String>['https://www.googleapis.com/auth/cloud-platform'],
- }) async {
- return clientViaApplicationDefaultCredentials(scopes: scopes);
- }
-}
diff --git a/auto_submit/lib/service/config.dart b/auto_submit/lib/service/config.dart
index 1ac3097..6564c71 100644
--- a/auto_submit/lib/service/config.dart
+++ b/auto_submit/lib/service/config.dart
@@ -15,11 +15,11 @@
import 'package:neat_cache/cache_provider.dart';
import 'package:neat_cache/neat_cache.dart';
import 'package:retry/retry.dart';
+import 'package:cocoon_server/access_client_provider.dart';
+import 'package:cocoon_server/bigquery.dart';
import '../foundation/providers.dart';
import '../service/secrets.dart';
-import 'access_client_provider.dart';
-import 'bigquery.dart';
import 'github_service.dart';
import 'log.dart';
diff --git a/auto_submit/lib/service/validation_service.dart b/auto_submit/lib/service/validation_service.dart
index 9e29565..a4a8088 100644
--- a/auto_submit/lib/service/validation_service.dart
+++ b/auto_submit/lib/service/validation_service.dart
@@ -2,19 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'package:auto_submit/exception/bigquery_exception.dart';
import 'package:auto_submit/exception/retryable_exception.dart';
import 'package:auto_submit/model/auto_submit_query_result.dart';
-import 'package:auto_submit/model/big_query_pull_request_record.dart';
import 'package:auto_submit/model/pull_request_data_types.dart';
import 'package:auto_submit/requests/graphql_queries.dart';
-import 'package:auto_submit/service/bigquery.dart';
import 'package:auto_submit/service/config.dart';
import 'package:auto_submit/service/github_service.dart';
import 'package:auto_submit/service/graphql_service.dart';
import 'package:auto_submit/service/log.dart';
import 'package:github/github.dart' as github;
import 'package:retry/retry.dart';
+import 'package:cocoon_server/big_query_pull_request_record.dart';
+import 'package:cocoon_server/bigquery.dart';
/// Class containing common methods to each of the pull request type validation
/// services.
diff --git a/auto_submit/pubspec.yaml b/auto_submit/pubspec.yaml
index 93ad004..3e7afc1 100644
--- a/auto_submit/pubspec.yaml
+++ b/auto_submit/pubspec.yaml
@@ -29,6 +29,8 @@
retry: 3.1.2
yaml: 3.1.2
mutex: 3.1.0
+ cocoon_server:
+ path: ../cocoon_server
dev_dependencies:
build_runner: 2.4.13
diff --git a/auto_submit/test/requests/check_pull_request_test.dart b/auto_submit/test/requests/check_pull_request_test.dart
index 5834685..07b3f8a 100644
--- a/auto_submit/test/requests/check_pull_request_test.dart
+++ b/auto_submit/test/requests/check_pull_request_test.dart
@@ -21,8 +21,8 @@
import 'package:test/test.dart';
import '../configuration/repository_configuration_data.dart';
-import '../service/bigquery_test.dart';
-import '../src/service/fake_bigquery_service.dart';
+import 'package:cocoon_server/testing/bigquery_testing.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import './github_webhook_test_data.dart';
import '../src/request_handling/fake_pubsub.dart';
import '../src/request_handling/fake_authentication.dart';
diff --git a/auto_submit/test/service/approver_service_test.dart b/auto_submit/test/service/approver_service_test.dart
index 003f743..bfcc693 100644
--- a/auto_submit/test/service/approver_service_test.dart
+++ b/auto_submit/test/service/approver_service_test.dart
@@ -7,11 +7,11 @@
import 'package:github/github.dart' as gh;
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../configuration/repository_configuration_data.dart';
import '../requests/github_webhook_test_data.dart';
import '../src/service/fake_config.dart';
-import '../utilities/mocks.dart';
void main() {
FakeConfig config;
diff --git a/auto_submit/test/service/bigquery_test.dart b/auto_submit/test/service/bigquery_test.dart
deleted file mode 100644
index 2b93f0e..0000000
--- a/auto_submit/test/service/bigquery_test.dart
+++ /dev/null
@@ -1,287 +0,0 @@
-// Copyright 2022 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'dart:convert';
-
-import 'package:auto_submit/exception/bigquery_exception.dart';
-import 'package:auto_submit/model/big_query_pull_request_record.dart';
-import 'package:googleapis/bigquery/v2.dart';
-import 'package:mockito/mockito.dart';
-import 'package:test/expect.dart';
-import 'package:test/scaffolding.dart';
-
-import '../src/service/fake_bigquery_service.dart';
-import '../utilities/mocks.dart';
-
-const String revertRequestRecordResponse = '''
-{
- "jobComplete": true,
- "rows": [
- { "f": [
- { "v": "flutter"},
- { "v": "cocoon" },
- { "v": "ricardoamador" },
- { "v": "1024" },
- { "v": "123f124" },
- { "v": "123456789" },
- { "v": "123456999" },
- { "v": "ricardoamador" },
- { "v": "2048" },
- { "v": "ce345dc" },
- { "v": "234567890" },
- { "v": "234567999" },
- { "v": "ricardoamador" },
- { "v": "11304" },
- { "v": "1640979000000" },
- { "v": "0" },
- { "v": "" }
- ]
- }
- ]
-}
-''';
-
-const String pullRequestRecordResponse = '''
-{
- "jobComplete": true,
- "rows": [
- { "f": [
- { "v": "123456789"},
- { "v": "234567890" },
- { "v": "flutter" },
- { "v": "cocoon" },
- { "v": "ricardoamador" },
- { "v": "345" },
- { "v": "ade456" },
- { "v": "merge" }
- ]
- }
- ]
-}
-''';
-
-const String successResponseNoRowsAffected = '''
-{
- "jobComplete": true
-}
-''';
-
-const String insertDeleteUpdateSuccessResponse = '''
-{
- "jobComplete": true,
- "numDmlAffectedRows": "1"
-}
-''';
-
-const String insertDeleteUpdateSuccessTooManyRows = '''
-{
- "jobComplete": true,
- "numDmlAffectedRows": "2"
-}
-''';
-
-const String selectPullRequestTooManyRowsResponse = '''
-{
- "jobComplete": true,
- "numDmlAffectedRows": "2",
- "rows": [
- { "f": [
- { "v": "123456789"},
- { "v": "234567890" },
- { "v": "flutter" },
- { "v": "cocoon" },
- { "v": "ricardoamador" },
- { "v": "345" },
- { "v": "ade456" },
- { "v": "merge" }
- ]
- },
- { "f": [
- { "v": "123456789"},
- { "v": "234567890" },
- { "v": "flutter" },
- { "v": "cocoon" },
- { "v": "ricardoamador" },
- { "v": "345" },
- { "v": "ade456" },
- { "v": "merge" }
- ]
- }
- ]
-}
-''';
-
-const String selectRevertRequestTooManyRowsResponse = '''
-{
- "jobComplete": true,
- "numDmlAffectedRows": "2",
- "rows": [
- { "f": [
- { "v": "flutter"},
- { "v": "cocoon" },
- { "v": "ricardoamador" },
- { "v": "1024" },
- { "v": "123f124" },
- { "v": "123456789" },
- { "v": "123456999" },
- { "v": "ricardoamador" },
- { "v": "2048" },
- { "v": "ce345dc" },
- { "v": "234567890" },
- { "v": "234567999" }
- ]
- },
- { "f": [
- { "v": "flutter"},
- { "v": "cocoon" },
- { "v": "ricardoamador" },
- { "v": "1024" },
- { "v": "123f124" },
- { "v": "123456789" },
- { "v": "123456999" },
- { "v": "ricardoamador" },
- { "v": "2048" },
- { "v": "ce345dc" },
- { "v": "234567890" },
- { "v": "234567999" }
- ]
- }
- ]
-}
-''';
-
-const String errorResponse = '''
-{
- "jobComplete": false
-}
-''';
-
-const String selectReviewRequestRecordsResponse = '''
-{
- "jobComplete": true,
- "numDmlAffectedRows": "2",
- "rows": [
- { "f": [
- { "v": "Keyonghan" },
- { "v": "2048" },
- { "v": "234567890" },
- { "v": "0" },
- { "v": "" }
- ]
- },
- { "f": [
- { "v": "caseyhillers" },
- { "v": "2049" },
- { "v": "234567890" },
- { "v": "0" },
- { "v": "" }
- ]
- }
- ]
-}
-''';
-
-const String expectedProjectId = 'flutter-dashboard';
-
-void main() {
- late FakeBigqueryService service;
- late MockJobsResource jobsResource;
-
- setUp(() {
- jobsResource = MockJobsResource();
- service = FakeBigqueryService(jobsResource);
- });
-
- test('Insert pull request record is successful.', () async {
- when(jobsResource.query(captureAny, expectedProjectId)).thenAnswer((Invocation invocation) {
- return Future<QueryResponse>.value(
- QueryResponse.fromJson(jsonDecode(insertDeleteUpdateSuccessResponse) as Map<dynamic, dynamic>),
- );
- });
-
- final PullRequestRecord pullRequestRecord = PullRequestRecord(
- prCreatedTimestamp: DateTime.fromMillisecondsSinceEpoch(123456789),
- prLandedTimestamp: DateTime.fromMillisecondsSinceEpoch(234567890),
- organization: 'flutter',
- repository: 'cocoon',
- author: 'ricardoamador',
- prNumber: 345,
- prCommit: 'ade456',
- prRequestType: 'merge',
- );
-
- bool hasError = false;
- try {
- await service.insertPullRequestRecord(
- projectId: expectedProjectId,
- pullRequestRecord: pullRequestRecord,
- );
- } on BigQueryException {
- hasError = true;
- }
- expect(hasError, isFalse);
- });
-
- test('Insert pull request record handles unsuccessful job complete error.', () async {
- when(jobsResource.query(captureAny, expectedProjectId)).thenAnswer((Invocation invocation) {
- return Future<QueryResponse>.value(
- QueryResponse.fromJson(jsonDecode(errorResponse) as Map<dynamic, dynamic>),
- );
- });
-
- bool hasError = false;
- final PullRequestRecord pullRequestRecord = PullRequestRecord(
- prCreatedTimestamp: DateTime.fromMillisecondsSinceEpoch(123456789),
- prLandedTimestamp: DateTime.fromMillisecondsSinceEpoch(234567890),
- organization: 'flutter',
- repository: 'cocoon',
- author: 'ricardoamador',
- prNumber: 345,
- prCommit: 'ade456',
- prRequestType: 'merge',
- );
-
- try {
- await service.insertPullRequestRecord(
- projectId: expectedProjectId,
- pullRequestRecord: pullRequestRecord,
- );
- } on BigQueryException catch (exception) {
- expect(exception.cause, 'Insert pull request $pullRequestRecord did not complete.');
- hasError = true;
- }
- expect(hasError, isTrue);
- });
-
- test('Insert pull request fails when multiple rows are returned.', () async {
- when(jobsResource.query(captureAny, expectedProjectId)).thenAnswer((Invocation invocation) {
- return Future<QueryResponse>.value(
- QueryResponse.fromJson(jsonDecode(selectPullRequestTooManyRowsResponse) as Map<dynamic, dynamic>),
- );
- });
-
- bool hasError = false;
- final PullRequestRecord pullRequestRecord = PullRequestRecord(
- prCreatedTimestamp: DateTime.fromMillisecondsSinceEpoch(123456789),
- prLandedTimestamp: DateTime.fromMillisecondsSinceEpoch(234567890),
- organization: 'flutter',
- repository: 'cocoon',
- author: 'ricardoamador',
- prNumber: 345,
- prCommit: 'ade456',
- prRequestType: 'merge',
- );
-
- try {
- await service.insertPullRequestRecord(
- projectId: expectedProjectId,
- pullRequestRecord: pullRequestRecord,
- );
- } on BigQueryException catch (exception) {
- expect(exception.cause, 'There was an error inserting $pullRequestRecord into the table.');
- hasError = true;
- }
- expect(hasError, isTrue);
- });
-}
diff --git a/auto_submit/test/service/github_service_test.dart b/auto_submit/test/service/github_service_test.dart
index 6bfd46b..a2bba2d 100644
--- a/auto_submit/test/service/github_service_test.dart
+++ b/auto_submit/test/service/github_service_test.dart
@@ -8,9 +8,9 @@
import 'package:github/github.dart';
import 'package:mockito/mockito.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../requests/github_webhook_test_data.dart';
-import '../utilities/mocks.dart';
void main() {
late GithubService githubService;
diff --git a/auto_submit/test/service/pull_request_validation_service_test.dart b/auto_submit/test/service/pull_request_validation_service_test.dart
index 4124c67..113010f 100644
--- a/auto_submit/test/service/pull_request_validation_service_test.dart
+++ b/auto_submit/test/service/pull_request_validation_service_test.dart
@@ -10,23 +10,22 @@
import 'package:auto_submit/service/log.dart';
import 'package:auto_submit/service/pull_request_validation_service.dart';
import 'package:auto_submit/service/validation_service.dart';
+import 'package:cocoon_server/testing/bigquery_testing.dart';
import 'package:github/github.dart';
import 'package:googleapis/bigquery/v2.dart';
import 'package:graphql/client.dart';
import 'package:mockito/mockito.dart';
import 'package:retry/retry.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../configuration/repository_configuration_data.dart';
import '../requests/github_webhook_test_data.dart';
import '../src/request_handling/fake_pubsub.dart';
-import '../src/service/fake_bigquery_service.dart';
import '../src/service/fake_config.dart';
import '../src/service/fake_graphql_client.dart';
import '../src/service/fake_github_service.dart';
import '../utilities/utils.dart';
-import '../utilities/mocks.dart';
-import 'bigquery_test.dart';
void main() {
late PullRequestValidationService validationService;
diff --git a/auto_submit/test/service/revert_request_validation_service_test.dart b/auto_submit/test/service/revert_request_validation_service_test.dart
index 622cd16..40a8877 100644
--- a/auto_submit/test/service/revert_request_validation_service_test.dart
+++ b/auto_submit/test/service/revert_request_validation_service_test.dart
@@ -13,11 +13,13 @@
import 'package:auto_submit/service/revert_request_validation_service.dart';
import 'package:auto_submit/service/validation_service.dart';
import 'package:auto_submit/validations/validation.dart';
+import 'package:cocoon_server/testing/bigquery_testing.dart';
import 'package:github/github.dart';
import 'package:googleapis/bigquery/v2.dart';
import 'package:mockito/mockito.dart';
import 'package:retry/retry.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../configuration/repository_configuration_data.dart';
import '../requests/github_webhook_test_data.dart';
@@ -25,7 +27,6 @@
import '../src/action/fake_revert_method.dart';
import '../src/request_handling/fake_pubsub.dart';
import '../src/service/fake_approver_service.dart';
-import '../src/service/fake_bigquery_service.dart';
import '../src/service/fake_config.dart';
import '../src/service/fake_discord_notification.dart';
import '../src/service/fake_graphql_client.dart';
@@ -35,8 +36,6 @@
import '../src/validations/fake_required_check_runs.dart';
import '../src/validations/fake_validation_filter.dart';
import '../utilities/utils.dart';
-import '../utilities/mocks.dart';
-import 'bigquery_test.dart';
void main() {
late RevertRequestValidationService validationService;
diff --git a/auto_submit/test/src/service/fake_bigquery_service.dart b/auto_submit/test/src/service/fake_bigquery_service.dart
deleted file mode 100644
index d9cbd3a..0000000
--- a/auto_submit/test/src/service/fake_bigquery_service.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2022 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'package:auto_submit/service/bigquery.dart';
-import 'package:googleapis/bigquery/v2.dart';
-
-import '../../utilities/mocks.mocks.dart';
-
-class FakeBigqueryService extends BigqueryService {
- FakeBigqueryService(this.jobsResource) : super(MockAccessClientProvider());
-
- JobsResource jobsResource;
-
- @override
- Future<JobsResource> defaultJobs() async {
- return jobsResource;
- }
-}
diff --git a/auto_submit/test/src/service/fake_config.dart b/auto_submit/test/src/service/fake_config.dart
index 8741489..efa5ee3 100644
--- a/auto_submit/test/src/service/fake_config.dart
+++ b/auto_submit/test/src/service/fake_config.dart
@@ -5,10 +5,10 @@
import 'dart:async';
import 'package:auto_submit/configuration/repository_configuration.dart';
-import 'package:auto_submit/service/bigquery.dart';
import 'package:auto_submit/service/config.dart';
import 'package:auto_submit/service/github_service.dart';
import 'package:auto_submit/service/secrets.dart';
+import 'package:cocoon_server/bigquery.dart';
import 'package:github/github.dart';
import 'package:neat_cache/neat_cache.dart';
import 'package:graphql/client.dart';
diff --git a/auto_submit/test/src/service/fake_github_service.dart b/auto_submit/test/src/service/fake_github_service.dart
index 2be53c4..b8afd2e 100644
--- a/auto_submit/test/src/service/fake_github_service.dart
+++ b/auto_submit/test/src/service/fake_github_service.dart
@@ -7,8 +7,7 @@
import 'package:auto_submit/service/github_service.dart';
import 'package:github/github.dart';
import 'package:shelf/src/response.dart';
-
-import '../../utilities/mocks.dart';
+import 'package:cocoon_server/testing/mocks.dart';
/// A fake GithubService implementation.
class FakeGithubService implements GithubService {
diff --git a/auto_submit/test/utilities/mocks.dart b/auto_submit/test/utilities/mocks.dart
index 06dafe0..daaf86d 100644
--- a/auto_submit/test/utilities/mocks.dart
+++ b/auto_submit/test/utilities/mocks.dart
@@ -2,23 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'package:auto_submit/service/access_client_provider.dart';
import 'package:auto_submit/service/approver_service.dart';
-import 'package:github/github.dart';
-import 'package:googleapis/bigquery/v2.dart';
import 'package:mockito/annotations.dart';
-import 'package:http/http.dart' as http;
export 'mocks.mocks.dart';
@GenerateMocks(<Type>[
- AccessClientProvider,
- JobsResource,
ApproverService,
- GitHub,
- PullRequestsService,
- RepositoriesService,
- GitHubComparison,
- http.Response,
])
void main() {}
diff --git a/auto_submit/test/utilities/mocks.mocks.dart b/auto_submit/test/utilities/mocks.mocks.dart
index 17dc80c..a7c8e49 100644
--- a/auto_submit/test/utilities/mocks.mocks.dart
+++ b/auto_submit/test/utilities/mocks.mocks.dart
@@ -3,18 +3,12 @@
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i6;
-import 'dart:typed_data' as _i11;
+import 'dart:async' as _i4;
-import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as _i8;
-import 'package:auto_submit/service/access_client_provider.dart' as _i7;
-import 'package:auto_submit/service/approver_service.dart' as _i9;
-import 'package:auto_submit/service/config.dart' as _i4;
+import 'package:auto_submit/service/approver_service.dart' as _i3;
+import 'package:auto_submit/service/config.dart' as _i2;
import 'package:github/github.dart' as _i5;
-import 'package:googleapis/bigquery/v2.dart' as _i3;
-import 'package:http/http.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
-import 'package:mockito/src/dummies.dart' as _i10;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
@@ -29,8 +23,8 @@
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
-class _FakeClient_0 extends _i1.SmartFake implements _i2.Client {
- _FakeClient_0(
+class _FakeConfig_0 extends _i1.SmartFake implements _i2.Config {
+ _FakeConfig_0(
Object parent,
Invocation parentInvocation,
) : super(
@@ -39,3286 +33,39 @@
);
}
-class _FakeJobCancelResponse_1 extends _i1.SmartFake implements _i3.JobCancelResponse {
- _FakeJobCancelResponse_1(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeJob_2 extends _i1.SmartFake implements _i3.Job {
- _FakeJob_2(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGetQueryResultsResponse_3 extends _i1.SmartFake implements _i3.GetQueryResultsResponse {
- _FakeGetQueryResultsResponse_3(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeJobList_4 extends _i1.SmartFake implements _i3.JobList {
- _FakeJobList_4(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeQueryResponse_5 extends _i1.SmartFake implements _i3.QueryResponse {
- _FakeQueryResponse_5(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeConfig_6 extends _i1.SmartFake implements _i4.Config {
- _FakeConfig_6(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeAuthentication_7 extends _i1.SmartFake implements _i5.Authentication {
- _FakeAuthentication_7(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeActivityService_8 extends _i1.SmartFake implements _i5.ActivityService {
- _FakeActivityService_8(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeAuthorizationsService_9 extends _i1.SmartFake implements _i5.AuthorizationsService {
- _FakeAuthorizationsService_9(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGistsService_10 extends _i1.SmartFake implements _i5.GistsService {
- _FakeGistsService_10(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGitService_11 extends _i1.SmartFake implements _i5.GitService {
- _FakeGitService_11(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeIssuesService_12 extends _i1.SmartFake implements _i5.IssuesService {
- _FakeIssuesService_12(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeMiscService_13 extends _i1.SmartFake implements _i5.MiscService {
- _FakeMiscService_13(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeOrganizationsService_14 extends _i1.SmartFake implements _i5.OrganizationsService {
- _FakeOrganizationsService_14(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePullRequestsService_15 extends _i1.SmartFake implements _i5.PullRequestsService {
- _FakePullRequestsService_15(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoriesService_16 extends _i1.SmartFake implements _i5.RepositoriesService {
- _FakeRepositoriesService_16(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeSearchService_17 extends _i1.SmartFake implements _i5.SearchService {
- _FakeSearchService_17(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeUrlShortenerService_18 extends _i1.SmartFake implements _i5.UrlShortenerService {
- _FakeUrlShortenerService_18(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeUsersService_19 extends _i1.SmartFake implements _i5.UsersService {
- _FakeUsersService_19(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeChecksService_20 extends _i1.SmartFake implements _i5.ChecksService {
- _FakeChecksService_20(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeFuture_21<T1> extends _i1.SmartFake implements _i6.Future<T1> {
- _FakeFuture_21(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeResponse_22 extends _i1.SmartFake implements _i2.Response {
- _FakeResponse_22(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGitHub_23 extends _i1.SmartFake implements _i5.GitHub {
- _FakeGitHub_23(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePullRequest_24 extends _i1.SmartFake implements _i5.PullRequest {
- _FakePullRequest_24(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePullRequestMerge_25 extends _i1.SmartFake implements _i5.PullRequestMerge {
- _FakePullRequestMerge_25(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePullRequestComment_26 extends _i1.SmartFake implements _i5.PullRequestComment {
- _FakePullRequestComment_26(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePullRequestReview_27 extends _i1.SmartFake implements _i5.PullRequestReview {
- _FakePullRequestReview_27(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepository_28 extends _i1.SmartFake implements _i5.Repository {
- _FakeRepository_28(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeLicenseDetails_29 extends _i1.SmartFake implements _i5.LicenseDetails {
- _FakeLicenseDetails_29(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeLanguageBreakdown_30 extends _i1.SmartFake implements _i5.LanguageBreakdown {
- _FakeLanguageBreakdown_30(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeBranch_31 extends _i1.SmartFake implements _i5.Branch {
- _FakeBranch_31(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeCommitComment_32 extends _i1.SmartFake implements _i5.CommitComment {
- _FakeCommitComment_32(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryCommit_33 extends _i1.SmartFake implements _i5.RepositoryCommit {
- _FakeRepositoryCommit_33(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGitHubComparison_34 extends _i1.SmartFake implements _i5.GitHubComparison {
- _FakeGitHubComparison_34(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeGitHubFile_35 extends _i1.SmartFake implements _i5.GitHubFile {
- _FakeGitHubFile_35(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryContents_36 extends _i1.SmartFake implements _i5.RepositoryContents {
- _FakeRepositoryContents_36(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeContentCreation_37 extends _i1.SmartFake implements _i5.ContentCreation {
- _FakeContentCreation_37(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeHook_38 extends _i1.SmartFake implements _i5.Hook {
- _FakeHook_38(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePublicKey_39 extends _i1.SmartFake implements _i5.PublicKey {
- _FakePublicKey_39(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryPages_40 extends _i1.SmartFake implements _i5.RepositoryPages {
- _FakeRepositoryPages_40(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakePageBuild_41 extends _i1.SmartFake implements _i5.PageBuild {
- _FakePageBuild_41(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRelease_42 extends _i1.SmartFake implements _i5.Release {
- _FakeRelease_42(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeReleaseAsset_43 extends _i1.SmartFake implements _i5.ReleaseAsset {
- _FakeReleaseAsset_43(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeContributorParticipation_44 extends _i1.SmartFake implements _i5.ContributorParticipation {
- _FakeContributorParticipation_44(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeRepositoryStatus_45 extends _i1.SmartFake implements _i5.RepositoryStatus {
- _FakeRepositoryStatus_45(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeCombinedRepositoryStatus_46 extends _i1.SmartFake implements _i5.CombinedRepositoryStatus {
- _FakeCombinedRepositoryStatus_46(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeReleaseNotes_47 extends _i1.SmartFake implements _i5.ReleaseNotes {
- _FakeReleaseNotes_47(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-/// A class which mocks [AccessClientProvider].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockAccessClientProvider extends _i1.Mock implements _i7.AccessClientProvider {
- MockAccessClientProvider() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i6.Future<_i2.Client> createAccessClient(
- {List<String>? scopes = const [r'https://www.googleapis.com/auth/cloud-platform']}) =>
- (super.noSuchMethod(
- Invocation.method(
- #createAccessClient,
- [],
- {#scopes: scopes},
- ),
- returnValue: _i6.Future<_i2.Client>.value(_FakeClient_0(
- this,
- Invocation.method(
- #createAccessClient,
- [],
- {#scopes: scopes},
- ),
- )),
- ) as _i6.Future<_i2.Client>);
-}
-
-/// A class which mocks [JobsResource].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockJobsResource extends _i1.Mock implements _i3.JobsResource {
- MockJobsResource() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i6.Future<_i3.JobCancelResponse> cancel(
- String? projectId,
- String? jobId, {
- String? location,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #cancel,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- returnValue: _i6.Future<_i3.JobCancelResponse>.value(_FakeJobCancelResponse_1(
- this,
- Invocation.method(
- #cancel,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i6.Future<_i3.JobCancelResponse>);
-
- @override
- _i6.Future<void> delete(
- String? projectId,
- String? jobId, {
- String? location,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #delete,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- returnValue: _i6.Future<void>.value(),
- returnValueForMissingStub: _i6.Future<void>.value(),
- ) as _i6.Future<void>);
-
- @override
- _i6.Future<_i3.Job> get(
- String? projectId,
- String? jobId, {
- String? location,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #get,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- returnValue: _i6.Future<_i3.Job>.value(_FakeJob_2(
- this,
- Invocation.method(
- #get,
- [
- projectId,
- jobId,
- ],
- {
- #location: location,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i6.Future<_i3.Job>);
-
- @override
- _i6.Future<_i3.GetQueryResultsResponse> getQueryResults(
- String? projectId,
- String? jobId, {
- bool? formatOptions_useInt64Timestamp,
- String? location,
- int? maxResults,
- String? pageToken,
- String? startIndex,
- int? timeoutMs,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getQueryResults,
- [
- projectId,
- jobId,
- ],
- {
- #formatOptions_useInt64Timestamp: formatOptions_useInt64Timestamp,
- #location: location,
- #maxResults: maxResults,
- #pageToken: pageToken,
- #startIndex: startIndex,
- #timeoutMs: timeoutMs,
- #$fields: $fields,
- },
- ),
- returnValue: _i6.Future<_i3.GetQueryResultsResponse>.value(_FakeGetQueryResultsResponse_3(
- this,
- Invocation.method(
- #getQueryResults,
- [
- projectId,
- jobId,
- ],
- {
- #formatOptions_useInt64Timestamp: formatOptions_useInt64Timestamp,
- #location: location,
- #maxResults: maxResults,
- #pageToken: pageToken,
- #startIndex: startIndex,
- #timeoutMs: timeoutMs,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i6.Future<_i3.GetQueryResultsResponse>);
-
- @override
- _i6.Future<_i3.Job> insert(
- _i3.Job? request,
- String? projectId, {
- String? $fields,
- _i8.UploadOptions? uploadOptions = _i8.UploadOptions.defaultOptions,
- _i8.Media? uploadMedia,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #insert,
- [
- request,
- projectId,
- ],
- {
- #$fields: $fields,
- #uploadOptions: uploadOptions,
- #uploadMedia: uploadMedia,
- },
- ),
- returnValue: _i6.Future<_i3.Job>.value(_FakeJob_2(
- this,
- Invocation.method(
- #insert,
- [
- request,
- projectId,
- ],
- {
- #$fields: $fields,
- #uploadOptions: uploadOptions,
- #uploadMedia: uploadMedia,
- },
- ),
- )),
- ) as _i6.Future<_i3.Job>);
-
- @override
- _i6.Future<_i3.JobList> list(
- String? projectId, {
- bool? allUsers,
- String? maxCreationTime,
- int? maxResults,
- String? minCreationTime,
- String? pageToken,
- String? parentJobId,
- String? projection,
- List<String>? stateFilter,
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #list,
- [projectId],
- {
- #allUsers: allUsers,
- #maxCreationTime: maxCreationTime,
- #maxResults: maxResults,
- #minCreationTime: minCreationTime,
- #pageToken: pageToken,
- #parentJobId: parentJobId,
- #projection: projection,
- #stateFilter: stateFilter,
- #$fields: $fields,
- },
- ),
- returnValue: _i6.Future<_i3.JobList>.value(_FakeJobList_4(
- this,
- Invocation.method(
- #list,
- [projectId],
- {
- #allUsers: allUsers,
- #maxCreationTime: maxCreationTime,
- #maxResults: maxResults,
- #minCreationTime: minCreationTime,
- #pageToken: pageToken,
- #parentJobId: parentJobId,
- #projection: projection,
- #stateFilter: stateFilter,
- #$fields: $fields,
- },
- ),
- )),
- ) as _i6.Future<_i3.JobList>);
-
- @override
- _i6.Future<_i3.QueryResponse> query(
- _i3.QueryRequest? request,
- String? projectId, {
- String? $fields,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #query,
- [
- request,
- projectId,
- ],
- {#$fields: $fields},
- ),
- returnValue: _i6.Future<_i3.QueryResponse>.value(_FakeQueryResponse_5(
- this,
- Invocation.method(
- #query,
- [
- request,
- projectId,
- ],
- {#$fields: $fields},
- ),
- )),
- ) as _i6.Future<_i3.QueryResponse>);
-}
-
/// A class which mocks [ApproverService].
///
/// See the documentation for Mockito's code generation for more information.
-class MockApproverService extends _i1.Mock implements _i9.ApproverService {
+class MockApproverService extends _i1.Mock implements _i3.ApproverService {
MockApproverService() {
_i1.throwOnMissingStub(this);
}
@override
- _i4.Config get config => (super.noSuchMethod(
+ _i2.Config get config => (super.noSuchMethod(
Invocation.getter(#config),
- returnValue: _FakeConfig_6(
+ returnValue: _FakeConfig_0(
this,
Invocation.getter(#config),
),
- ) as _i4.Config);
+ ) as _i2.Config);
@override
- _i6.Future<Set<String>> getAutoApprovalAccounts(_i5.RepositorySlug? slug) => (super.noSuchMethod(
+ _i4.Future<Set<String>> getAutoApprovalAccounts(_i5.RepositorySlug? slug) => (super.noSuchMethod(
Invocation.method(
#getAutoApprovalAccounts,
[slug],
),
- returnValue: _i6.Future<Set<String>>.value(<String>{}),
- ) as _i6.Future<Set<String>>);
+ returnValue: _i4.Future<Set<String>>.value(<String>{}),
+ ) as _i4.Future<Set<String>>);
@override
- _i6.Future<void> autoApproval(_i5.PullRequest? pullRequest) => (super.noSuchMethod(
+ _i4.Future<void> autoApproval(_i5.PullRequest? pullRequest) => (super.noSuchMethod(
Invocation.method(
#autoApproval,
[pullRequest],
),
- returnValue: _i6.Future<void>.value(),
- returnValueForMissingStub: _i6.Future<void>.value(),
- ) as _i6.Future<void>);
-}
-
-/// A class which mocks [GitHub].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockGitHub extends _i1.Mock implements _i5.GitHub {
- MockGitHub() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i5.Authentication get auth => (super.noSuchMethod(
- Invocation.getter(#auth),
- returnValue: _FakeAuthentication_7(
- this,
- Invocation.getter(#auth),
- ),
- ) as _i5.Authentication);
-
- @override
- set auth(_i5.Authentication? _auth) => super.noSuchMethod(
- Invocation.setter(
- #auth,
- _auth,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- String get endpoint => (super.noSuchMethod(
- Invocation.getter(#endpoint),
- returnValue: _i10.dummyValue<String>(
- this,
- Invocation.getter(#endpoint),
- ),
- ) as String);
-
- @override
- String get version => (super.noSuchMethod(
- Invocation.getter(#version),
- returnValue: _i10.dummyValue<String>(
- this,
- Invocation.getter(#version),
- ),
- ) as String);
-
- @override
- _i2.Client get client => (super.noSuchMethod(
- Invocation.getter(#client),
- returnValue: _FakeClient_0(
- this,
- Invocation.getter(#client),
- ),
- ) as _i2.Client);
-
- @override
- _i5.ActivityService get activity => (super.noSuchMethod(
- Invocation.getter(#activity),
- returnValue: _FakeActivityService_8(
- this,
- Invocation.getter(#activity),
- ),
- ) as _i5.ActivityService);
-
- @override
- _i5.AuthorizationsService get authorizations => (super.noSuchMethod(
- Invocation.getter(#authorizations),
- returnValue: _FakeAuthorizationsService_9(
- this,
- Invocation.getter(#authorizations),
- ),
- ) as _i5.AuthorizationsService);
-
- @override
- _i5.GistsService get gists => (super.noSuchMethod(
- Invocation.getter(#gists),
- returnValue: _FakeGistsService_10(
- this,
- Invocation.getter(#gists),
- ),
- ) as _i5.GistsService);
-
- @override
- _i5.GitService get git => (super.noSuchMethod(
- Invocation.getter(#git),
- returnValue: _FakeGitService_11(
- this,
- Invocation.getter(#git),
- ),
- ) as _i5.GitService);
-
- @override
- _i5.IssuesService get issues => (super.noSuchMethod(
- Invocation.getter(#issues),
- returnValue: _FakeIssuesService_12(
- this,
- Invocation.getter(#issues),
- ),
- ) as _i5.IssuesService);
-
- @override
- _i5.MiscService get misc => (super.noSuchMethod(
- Invocation.getter(#misc),
- returnValue: _FakeMiscService_13(
- this,
- Invocation.getter(#misc),
- ),
- ) as _i5.MiscService);
-
- @override
- _i5.OrganizationsService get organizations => (super.noSuchMethod(
- Invocation.getter(#organizations),
- returnValue: _FakeOrganizationsService_14(
- this,
- Invocation.getter(#organizations),
- ),
- ) as _i5.OrganizationsService);
-
- @override
- _i5.PullRequestsService get pullRequests => (super.noSuchMethod(
- Invocation.getter(#pullRequests),
- returnValue: _FakePullRequestsService_15(
- this,
- Invocation.getter(#pullRequests),
- ),
- ) as _i5.PullRequestsService);
-
- @override
- _i5.RepositoriesService get repositories => (super.noSuchMethod(
- Invocation.getter(#repositories),
- returnValue: _FakeRepositoriesService_16(
- this,
- Invocation.getter(#repositories),
- ),
- ) as _i5.RepositoriesService);
-
- @override
- _i5.SearchService get search => (super.noSuchMethod(
- Invocation.getter(#search),
- returnValue: _FakeSearchService_17(
- this,
- Invocation.getter(#search),
- ),
- ) as _i5.SearchService);
-
- @override
- _i5.UrlShortenerService get urlShortener => (super.noSuchMethod(
- Invocation.getter(#urlShortener),
- returnValue: _FakeUrlShortenerService_18(
- this,
- Invocation.getter(#urlShortener),
- ),
- ) as _i5.UrlShortenerService);
-
- @override
- _i5.UsersService get users => (super.noSuchMethod(
- Invocation.getter(#users),
- returnValue: _FakeUsersService_19(
- this,
- Invocation.getter(#users),
- ),
- ) as _i5.UsersService);
-
- @override
- _i5.ChecksService get checks => (super.noSuchMethod(
- Invocation.getter(#checks),
- returnValue: _FakeChecksService_20(
- this,
- Invocation.getter(#checks),
- ),
- ) as _i5.ChecksService);
-
- @override
- _i6.Future<T> getJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, String>? params,
- _i5.JSONConverter<S, T>? convert,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #preview: preview,
- },
- ),
- returnValue: _i10.ifNotNull(
- _i10.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #getJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i6.Future<T>.value(v),
- ) ??
- _FakeFuture_21<T>(
- this,
- Invocation.method(
- #getJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #preview: preview,
- },
- ),
- ),
- ) as _i6.Future<T>);
-
- @override
- _i6.Future<T> postJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i5.JSONConverter<S, T>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #postJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i10.ifNotNull(
- _i10.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #postJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i6.Future<T>.value(v),
- ) ??
- _FakeFuture_21<T>(
- this,
- Invocation.method(
- #postJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i6.Future<T>);
-
- @override
- _i6.Future<T> putJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i5.JSONConverter<S, T>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #putJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i10.ifNotNull(
- _i10.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #putJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i6.Future<T>.value(v),
- ) ??
- _FakeFuture_21<T>(
- this,
- Invocation.method(
- #putJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i6.Future<T>);
-
- @override
- _i6.Future<T> patchJSON<S, T>(
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i5.JSONConverter<S, T>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #patchJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i10.ifNotNull(
- _i10.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #patchJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i6.Future<T>.value(v),
- ) ??
- _FakeFuture_21<T>(
- this,
- Invocation.method(
- #patchJSON,
- [path],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i6.Future<T>);
-
- @override
- _i6.Future<T> requestJson<S, T>(
- String? method,
- String? path, {
- int? statusCode,
- void Function(_i2.Response)? fail,
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- _i5.JSONConverter<S, T?>? convert,
- dynamic body,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #requestJson,
- [
- method,
- path,
- ],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- returnValue: _i10.ifNotNull(
- _i10.dummyValueOrNull<T>(
- this,
- Invocation.method(
- #requestJson,
- [
- method,
- path,
- ],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- (T v) => _i6.Future<T>.value(v),
- ) ??
- _FakeFuture_21<T>(
- this,
- Invocation.method(
- #requestJson,
- [
- method,
- path,
- ],
- {
- #statusCode: statusCode,
- #fail: fail,
- #headers: headers,
- #params: params,
- #convert: convert,
- #body: body,
- #preview: preview,
- },
- ),
- ),
- ) as _i6.Future<T>);
-
- @override
- _i6.Future<_i2.Response> request(
- String? method,
- String? path, {
- Map<String, String>? headers,
- Map<String, dynamic>? params,
- dynamic body,
- int? statusCode,
- void Function(_i2.Response)? fail,
- String? preview,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #request,
- [
- method,
- path,
- ],
- {
- #headers: headers,
- #params: params,
- #body: body,
- #statusCode: statusCode,
- #fail: fail,
- #preview: preview,
- },
- ),
- returnValue: _i6.Future<_i2.Response>.value(_FakeResponse_22(
- this,
- Invocation.method(
- #request,
- [
- method,
- path,
- ],
- {
- #headers: headers,
- #params: params,
- #body: body,
- #statusCode: statusCode,
- #fail: fail,
- #preview: preview,
- },
- ),
- )),
- ) as _i6.Future<_i2.Response>);
-
- @override
- Never handleStatusCode(_i2.Response? response) => (super.noSuchMethod(
- Invocation.method(
- #handleStatusCode,
- [response],
- ),
- returnValue: null,
- ) as Never);
-
- @override
- void dispose() => super.noSuchMethod(
- Invocation.method(
- #dispose,
- [],
- ),
- returnValueForMissingStub: null,
- );
-}
-
-/// A class which mocks [PullRequestsService].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockPullRequestsService extends _i1.Mock implements _i5.PullRequestsService {
- MockPullRequestsService() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i5.GitHub get github => (super.noSuchMethod(
- Invocation.getter(#github),
- returnValue: _FakeGitHub_23(
- this,
- Invocation.getter(#github),
- ),
- ) as _i5.GitHub);
-
- @override
- _i6.Stream<_i5.PullRequest> list(
- _i5.RepositorySlug? slug, {
- int? pages,
- String? base,
- String? direction = r'desc',
- String? head,
- String? sort = r'created',
- String? state = r'open',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #list,
- [slug],
- {
- #pages: pages,
- #base: base,
- #direction: direction,
- #head: head,
- #sort: sort,
- #state: state,
- },
- ),
- returnValue: _i6.Stream<_i5.PullRequest>.empty(),
- ) as _i6.Stream<_i5.PullRequest>);
-
- @override
- _i6.Future<_i5.PullRequest> get(
- _i5.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #get,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i6.Future<_i5.PullRequest>.value(_FakePullRequest_24(
- this,
- Invocation.method(
- #get,
- [
- slug,
- number,
- ],
- ),
- )),
- ) as _i6.Future<_i5.PullRequest>);
-
- @override
- _i6.Future<_i5.PullRequest> create(
- _i5.RepositorySlug? slug,
- _i5.CreatePullRequest? request,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #create,
- [
- slug,
- request,
- ],
- ),
- returnValue: _i6.Future<_i5.PullRequest>.value(_FakePullRequest_24(
- this,
- Invocation.method(
- #create,
- [
- slug,
- request,
- ],
- ),
- )),
- ) as _i6.Future<_i5.PullRequest>);
-
- @override
- _i6.Future<_i5.PullRequest> edit(
- _i5.RepositorySlug? slug,
- int? number, {
- String? title,
- String? body,
- String? state,
- String? base,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #edit,
- [
- slug,
- number,
- ],
- {
- #title: title,
- #body: body,
- #state: state,
- #base: base,
- },
- ),
- returnValue: _i6.Future<_i5.PullRequest>.value(_FakePullRequest_24(
- this,
- Invocation.method(
- #edit,
- [
- slug,
- number,
- ],
- {
- #title: title,
- #body: body,
- #state: state,
- #base: base,
- },
- ),
- )),
- ) as _i6.Future<_i5.PullRequest>);
-
- @override
- _i6.Stream<_i5.RepositoryCommit> listCommits(
- _i5.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listCommits,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i6.Stream<_i5.RepositoryCommit>.empty(),
- ) as _i6.Stream<_i5.RepositoryCommit>);
-
- @override
- _i6.Stream<_i5.PullRequestFile> listFiles(
- _i5.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listFiles,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i6.Stream<_i5.PullRequestFile>.empty(),
- ) as _i6.Stream<_i5.PullRequestFile>);
-
- @override
- _i6.Stream<_i5.PullRequestReview> listReviews(
- _i5.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listReviews,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i6.Stream<_i5.PullRequestReview>.empty(),
- ) as _i6.Stream<_i5.PullRequestReview>);
-
- @override
- _i6.Future<bool> isMerged(
- _i5.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #isMerged,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<_i5.PullRequestMerge> merge(
- _i5.RepositorySlug? slug,
- int? number, {
- String? message,
- _i5.MergeMethod? mergeMethod = _i5.MergeMethod.merge,
- String? requestSha,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #merge,
- [
- slug,
- number,
- ],
- {
- #message: message,
- #mergeMethod: mergeMethod,
- #requestSha: requestSha,
- },
- ),
- returnValue: _i6.Future<_i5.PullRequestMerge>.value(_FakePullRequestMerge_25(
- this,
- Invocation.method(
- #merge,
- [
- slug,
- number,
- ],
- {
- #message: message,
- #mergeMethod: mergeMethod,
- #requestSha: requestSha,
- },
- ),
- )),
- ) as _i6.Future<_i5.PullRequestMerge>);
-
- @override
- _i6.Stream<_i5.PullRequestComment> listCommentsByPullRequest(
- _i5.RepositorySlug? slug,
- int? number,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listCommentsByPullRequest,
- [
- slug,
- number,
- ],
- ),
- returnValue: _i6.Stream<_i5.PullRequestComment>.empty(),
- ) as _i6.Stream<_i5.PullRequestComment>);
-
- @override
- _i6.Stream<_i5.PullRequestComment> listComments(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listComments,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.PullRequestComment>.empty(),
- ) as _i6.Stream<_i5.PullRequestComment>);
-
- @override
- _i6.Future<_i5.PullRequestComment> createComment(
- _i5.RepositorySlug? slug,
- int? number,
- _i5.CreatePullRequestComment? comment,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createComment,
- [
- slug,
- number,
- comment,
- ],
- ),
- returnValue: _i6.Future<_i5.PullRequestComment>.value(_FakePullRequestComment_26(
- this,
- Invocation.method(
- #createComment,
- [
- slug,
- number,
- comment,
- ],
- ),
- )),
- ) as _i6.Future<_i5.PullRequestComment>);
-
- @override
- _i6.Future<_i5.PullRequestReview> createReview(
- _i5.RepositorySlug? slug,
- _i5.CreatePullRequestReview? review,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createReview,
- [
- slug,
- review,
- ],
- ),
- returnValue: _i6.Future<_i5.PullRequestReview>.value(_FakePullRequestReview_27(
- this,
- Invocation.method(
- #createReview,
- [
- slug,
- review,
- ],
- ),
- )),
- ) as _i6.Future<_i5.PullRequestReview>);
-}
-
-/// A class which mocks [RepositoriesService].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockRepositoriesService extends _i1.Mock implements _i5.RepositoriesService {
- MockRepositoriesService() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i5.GitHub get github => (super.noSuchMethod(
- Invocation.getter(#github),
- returnValue: _FakeGitHub_23(
- this,
- Invocation.getter(#github),
- ),
- ) as _i5.GitHub);
-
- @override
- _i6.Stream<_i5.Repository> listRepositories({
- String? type = r'owner',
- String? sort = r'full_name',
- String? direction = r'asc',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listRepositories,
- [],
- {
- #type: type,
- #sort: sort,
- #direction: direction,
- },
- ),
- returnValue: _i6.Stream<_i5.Repository>.empty(),
- ) as _i6.Stream<_i5.Repository>);
-
- @override
- _i6.Stream<_i5.Repository> listUserRepositories(
- String? user, {
- String? type = r'owner',
- String? sort = r'full_name',
- String? direction = r'asc',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listUserRepositories,
- [user],
- {
- #type: type,
- #sort: sort,
- #direction: direction,
- },
- ),
- returnValue: _i6.Stream<_i5.Repository>.empty(),
- ) as _i6.Stream<_i5.Repository>);
-
- @override
- _i6.Stream<_i5.Repository> listOrganizationRepositories(
- String? org, {
- String? type = r'all',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listOrganizationRepositories,
- [org],
- {#type: type},
- ),
- returnValue: _i6.Stream<_i5.Repository>.empty(),
- ) as _i6.Stream<_i5.Repository>);
-
- @override
- _i6.Stream<_i5.Repository> listPublicRepositories({
- int? limit = 50,
- DateTime? since,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listPublicRepositories,
- [],
- {
- #limit: limit,
- #since: since,
- },
- ),
- returnValue: _i6.Stream<_i5.Repository>.empty(),
- ) as _i6.Stream<_i5.Repository>);
-
- @override
- _i6.Future<_i5.Repository> createRepository(
- _i5.CreateRepository? repository, {
- String? org,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createRepository,
- [repository],
- {#org: org},
- ),
- returnValue: _i6.Future<_i5.Repository>.value(_FakeRepository_28(
- this,
- Invocation.method(
- #createRepository,
- [repository],
- {#org: org},
- ),
- )),
- ) as _i6.Future<_i5.Repository>);
-
- @override
- _i6.Future<_i5.LicenseDetails> getLicense(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getLicense,
- [slug],
- ),
- returnValue: _i6.Future<_i5.LicenseDetails>.value(_FakeLicenseDetails_29(
- this,
- Invocation.method(
- #getLicense,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.LicenseDetails>);
-
- @override
- _i6.Future<_i5.Repository> getRepository(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getRepository,
- [slug],
- ),
- returnValue: _i6.Future<_i5.Repository>.value(_FakeRepository_28(
- this,
- Invocation.method(
- #getRepository,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.Repository>);
-
- @override
- _i6.Stream<_i5.Repository> getRepositories(List<_i5.RepositorySlug>? slugs) => (super.noSuchMethod(
- Invocation.method(
- #getRepositories,
- [slugs],
- ),
- returnValue: _i6.Stream<_i5.Repository>.empty(),
- ) as _i6.Stream<_i5.Repository>);
-
- @override
- _i6.Future<_i5.Repository> editRepository(
- _i5.RepositorySlug? slug, {
- String? name,
- String? description,
- String? homepage,
- bool? private,
- bool? hasIssues,
- bool? hasWiki,
- bool? hasDownloads,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editRepository,
- [slug],
- {
- #name: name,
- #description: description,
- #homepage: homepage,
- #private: private,
- #hasIssues: hasIssues,
- #hasWiki: hasWiki,
- #hasDownloads: hasDownloads,
- },
- ),
- returnValue: _i6.Future<_i5.Repository>.value(_FakeRepository_28(
- this,
- Invocation.method(
- #editRepository,
- [slug],
- {
- #name: name,
- #description: description,
- #homepage: homepage,
- #private: private,
- #hasIssues: hasIssues,
- #hasWiki: hasWiki,
- #hasDownloads: hasDownloads,
- },
- ),
- )),
- ) as _i6.Future<_i5.Repository>);
-
- @override
- _i6.Future<bool> deleteRepository(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #deleteRepository,
- [slug],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Stream<_i5.Contributor> listContributors(
- _i5.RepositorySlug? slug, {
- bool? anon = false,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listContributors,
- [slug],
- {#anon: anon},
- ),
- returnValue: _i6.Stream<_i5.Contributor>.empty(),
- ) as _i6.Stream<_i5.Contributor>);
-
- @override
- _i6.Stream<_i5.Team> listTeams(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listTeams,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.Team>.empty(),
- ) as _i6.Stream<_i5.Team>);
-
- @override
- _i6.Future<_i5.LanguageBreakdown> listLanguages(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listLanguages,
- [slug],
- ),
- returnValue: _i6.Future<_i5.LanguageBreakdown>.value(_FakeLanguageBreakdown_30(
- this,
- Invocation.method(
- #listLanguages,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.LanguageBreakdown>);
-
- @override
- _i6.Stream<_i5.Tag> listTags(
- _i5.RepositorySlug? slug, {
- int? page = 1,
- int? pages,
- int? perPage = 30,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listTags,
- [slug],
- {
- #page: page,
- #pages: pages,
- #perPage: perPage,
- },
- ),
- returnValue: _i6.Stream<_i5.Tag>.empty(),
- ) as _i6.Stream<_i5.Tag>);
-
- @override
- _i6.Stream<_i5.Branch> listBranches(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listBranches,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.Branch>.empty(),
- ) as _i6.Stream<_i5.Branch>);
-
- @override
- _i6.Future<_i5.Branch> getBranch(
- _i5.RepositorySlug? slug,
- String? branch,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getBranch,
- [
- slug,
- branch,
- ],
- ),
- returnValue: _i6.Future<_i5.Branch>.value(_FakeBranch_31(
- this,
- Invocation.method(
- #getBranch,
- [
- slug,
- branch,
- ],
- ),
- )),
- ) as _i6.Future<_i5.Branch>);
-
- @override
- _i6.Stream<_i5.Collaborator> listCollaborators(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCollaborators,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.Collaborator>.empty(),
- ) as _i6.Stream<_i5.Collaborator>);
-
- @override
- _i6.Future<bool> isCollaborator(
- _i5.RepositorySlug? slug,
- String? user,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #isCollaborator,
- [
- slug,
- user,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<bool> addCollaborator(
- _i5.RepositorySlug? slug,
- String? user,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #addCollaborator,
- [
- slug,
- user,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<bool> removeCollaborator(
- _i5.RepositorySlug? slug,
- String? user,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #removeCollaborator,
- [
- slug,
- user,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Stream<_i5.CommitComment> listSingleCommitComments(
- _i5.RepositorySlug? slug,
- _i5.RepositoryCommit? commit,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listSingleCommitComments,
- [
- slug,
- commit,
- ],
- ),
- returnValue: _i6.Stream<_i5.CommitComment>.empty(),
- ) as _i6.Stream<_i5.CommitComment>);
-
- @override
- _i6.Stream<_i5.CommitComment> listCommitComments(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCommitComments,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.CommitComment>.empty(),
- ) as _i6.Stream<_i5.CommitComment>);
-
- @override
- _i6.Future<_i5.CommitComment> createCommitComment(
- _i5.RepositorySlug? slug,
- _i5.RepositoryCommit? commit, {
- required String? body,
- String? path,
- int? position,
- int? line,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createCommitComment,
- [
- slug,
- commit,
- ],
- {
- #body: body,
- #path: path,
- #position: position,
- #line: line,
- },
- ),
- returnValue: _i6.Future<_i5.CommitComment>.value(_FakeCommitComment_32(
- this,
- Invocation.method(
- #createCommitComment,
- [
- slug,
- commit,
- ],
- {
- #body: body,
- #path: path,
- #position: position,
- #line: line,
- },
- ),
- )),
- ) as _i6.Future<_i5.CommitComment>);
-
- @override
- _i6.Future<_i5.CommitComment> getCommitComment(
- _i5.RepositorySlug? slug, {
- required int? id,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCommitComment,
- [slug],
- {#id: id},
- ),
- returnValue: _i6.Future<_i5.CommitComment>.value(_FakeCommitComment_32(
- this,
- Invocation.method(
- #getCommitComment,
- [slug],
- {#id: id},
- ),
- )),
- ) as _i6.Future<_i5.CommitComment>);
-
- @override
- _i6.Future<_i5.CommitComment> updateCommitComment(
- _i5.RepositorySlug? slug, {
- required int? id,
- required String? body,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #updateCommitComment,
- [slug],
- {
- #id: id,
- #body: body,
- },
- ),
- returnValue: _i6.Future<_i5.CommitComment>.value(_FakeCommitComment_32(
- this,
- Invocation.method(
- #updateCommitComment,
- [slug],
- {
- #id: id,
- #body: body,
- },
- ),
- )),
- ) as _i6.Future<_i5.CommitComment>);
-
- @override
- _i6.Future<bool> deleteCommitComment(
- _i5.RepositorySlug? slug, {
- required int? id,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteCommitComment,
- [slug],
- {#id: id},
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Stream<_i5.RepositoryCommit> listCommits(
- _i5.RepositorySlug? slug, {
- String? sha,
- String? path,
- String? author,
- String? committer,
- DateTime? since,
- DateTime? until,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #listCommits,
- [slug],
- {
- #sha: sha,
- #path: path,
- #author: author,
- #committer: committer,
- #since: since,
- #until: until,
- },
- ),
- returnValue: _i6.Stream<_i5.RepositoryCommit>.empty(),
- ) as _i6.Stream<_i5.RepositoryCommit>);
-
- @override
- _i6.Future<_i5.RepositoryCommit> getCommit(
- _i5.RepositorySlug? slug,
- String? sha,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCommit,
- [
- slug,
- sha,
- ],
- ),
- returnValue: _i6.Future<_i5.RepositoryCommit>.value(_FakeRepositoryCommit_33(
- this,
- Invocation.method(
- #getCommit,
- [
- slug,
- sha,
- ],
- ),
- )),
- ) as _i6.Future<_i5.RepositoryCommit>);
-
- @override
- _i6.Future<String> getCommitDiff(
- _i5.RepositorySlug? slug,
- String? sha,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCommitDiff,
- [
- slug,
- sha,
- ],
- ),
- returnValue: _i6.Future<String>.value(_i10.dummyValue<String>(
- this,
- Invocation.method(
- #getCommitDiff,
- [
- slug,
- sha,
- ],
- ),
- )),
- ) as _i6.Future<String>);
-
- @override
- _i6.Future<_i5.GitHubComparison> compareCommits(
- _i5.RepositorySlug? slug,
- String? refBase,
- String? refHead,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #compareCommits,
- [
- slug,
- refBase,
- refHead,
- ],
- ),
- returnValue: _i6.Future<_i5.GitHubComparison>.value(_FakeGitHubComparison_34(
- this,
- Invocation.method(
- #compareCommits,
- [
- slug,
- refBase,
- refHead,
- ],
- ),
- )),
- ) as _i6.Future<_i5.GitHubComparison>);
-
- @override
- _i6.Future<_i5.GitHubFile> getReadme(
- _i5.RepositorySlug? slug, {
- String? ref,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReadme,
- [slug],
- {#ref: ref},
- ),
- returnValue: _i6.Future<_i5.GitHubFile>.value(_FakeGitHubFile_35(
- this,
- Invocation.method(
- #getReadme,
- [slug],
- {#ref: ref},
- ),
- )),
- ) as _i6.Future<_i5.GitHubFile>);
-
- @override
- _i6.Future<_i5.RepositoryContents> getContents(
- _i5.RepositorySlug? slug,
- String? path, {
- String? ref,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getContents,
- [
- slug,
- path,
- ],
- {#ref: ref},
- ),
- returnValue: _i6.Future<_i5.RepositoryContents>.value(_FakeRepositoryContents_36(
- this,
- Invocation.method(
- #getContents,
- [
- slug,
- path,
- ],
- {#ref: ref},
- ),
- )),
- ) as _i6.Future<_i5.RepositoryContents>);
-
- @override
- _i6.Future<_i5.ContentCreation> createFile(
- _i5.RepositorySlug? slug,
- _i5.CreateFile? file,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createFile,
- [
- slug,
- file,
- ],
- ),
- returnValue: _i6.Future<_i5.ContentCreation>.value(_FakeContentCreation_37(
- this,
- Invocation.method(
- #createFile,
- [
- slug,
- file,
- ],
- ),
- )),
- ) as _i6.Future<_i5.ContentCreation>);
-
- @override
- _i6.Future<_i5.ContentCreation> updateFile(
- _i5.RepositorySlug? slug,
- String? path,
- String? message,
- String? content,
- String? sha, {
- String? branch,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #updateFile,
- [
- slug,
- path,
- message,
- content,
- sha,
- ],
- {#branch: branch},
- ),
- returnValue: _i6.Future<_i5.ContentCreation>.value(_FakeContentCreation_37(
- this,
- Invocation.method(
- #updateFile,
- [
- slug,
- path,
- message,
- content,
- sha,
- ],
- {#branch: branch},
- ),
- )),
- ) as _i6.Future<_i5.ContentCreation>);
-
- @override
- _i6.Future<_i5.ContentCreation> deleteFile(
- _i5.RepositorySlug? slug,
- String? path,
- String? message,
- String? sha,
- String? branch,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteFile,
- [
- slug,
- path,
- message,
- sha,
- branch,
- ],
- ),
- returnValue: _i6.Future<_i5.ContentCreation>.value(_FakeContentCreation_37(
- this,
- Invocation.method(
- #deleteFile,
- [
- slug,
- path,
- message,
- sha,
- branch,
- ],
- ),
- )),
- ) as _i6.Future<_i5.ContentCreation>);
-
- @override
- _i6.Future<String?> getArchiveLink(
- _i5.RepositorySlug? slug,
- String? ref, {
- String? format = r'tarball',
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getArchiveLink,
- [
- slug,
- ref,
- ],
- {#format: format},
- ),
- returnValue: _i6.Future<String?>.value(),
- ) as _i6.Future<String?>);
-
- @override
- _i6.Stream<_i5.Repository> listForks(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listForks,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.Repository>.empty(),
- ) as _i6.Stream<_i5.Repository>);
-
- @override
- _i6.Future<_i5.Repository> createFork(
- _i5.RepositorySlug? slug, [
- _i5.CreateFork? fork,
- ]) =>
- (super.noSuchMethod(
- Invocation.method(
- #createFork,
- [
- slug,
- fork,
- ],
- ),
- returnValue: _i6.Future<_i5.Repository>.value(_FakeRepository_28(
- this,
- Invocation.method(
- #createFork,
- [
- slug,
- fork,
- ],
- ),
- )),
- ) as _i6.Future<_i5.Repository>);
-
- @override
- _i6.Stream<_i5.Hook> listHooks(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listHooks,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.Hook>.empty(),
- ) as _i6.Stream<_i5.Hook>);
-
- @override
- _i6.Future<_i5.Hook> getHook(
- _i5.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i6.Future<_i5.Hook>.value(_FakeHook_38(
- this,
- Invocation.method(
- #getHook,
- [
- slug,
- id,
- ],
- ),
- )),
- ) as _i6.Future<_i5.Hook>);
-
- @override
- _i6.Future<_i5.Hook> createHook(
- _i5.RepositorySlug? slug,
- _i5.CreateHook? hook,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createHook,
- [
- slug,
- hook,
- ],
- ),
- returnValue: _i6.Future<_i5.Hook>.value(_FakeHook_38(
- this,
- Invocation.method(
- #createHook,
- [
- slug,
- hook,
- ],
- ),
- )),
- ) as _i6.Future<_i5.Hook>);
-
- @override
- _i6.Future<_i5.Hook> editHook(
- _i5.RepositorySlug? slug,
- _i5.Hook? hookToEdit, {
- String? configUrl,
- String? configContentType,
- String? configSecret,
- bool? configInsecureSsl,
- List<String>? events,
- List<String>? addEvents,
- List<String>? removeEvents,
- bool? active,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editHook,
- [
- slug,
- hookToEdit,
- ],
- {
- #configUrl: configUrl,
- #configContentType: configContentType,
- #configSecret: configSecret,
- #configInsecureSsl: configInsecureSsl,
- #events: events,
- #addEvents: addEvents,
- #removeEvents: removeEvents,
- #active: active,
- },
- ),
- returnValue: _i6.Future<_i5.Hook>.value(_FakeHook_38(
- this,
- Invocation.method(
- #editHook,
- [
- slug,
- hookToEdit,
- ],
- {
- #configUrl: configUrl,
- #configContentType: configContentType,
- #configSecret: configSecret,
- #configInsecureSsl: configInsecureSsl,
- #events: events,
- #addEvents: addEvents,
- #removeEvents: removeEvents,
- #active: active,
- },
- ),
- )),
- ) as _i6.Future<_i5.Hook>);
-
- @override
- _i6.Future<bool> testPushHook(
- _i5.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #testPushHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<bool> pingHook(
- _i5.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #pingHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<bool> deleteHook(
- _i5.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteHook,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Stream<_i5.PublicKey> listDeployKeys(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listDeployKeys,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.PublicKey>.empty(),
- ) as _i6.Stream<_i5.PublicKey>);
-
- @override
- _i6.Future<_i5.PublicKey> getDeployKey(
- _i5.RepositorySlug? slug, {
- required int? id,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getDeployKey,
- [slug],
- {#id: id},
- ),
- returnValue: _i6.Future<_i5.PublicKey>.value(_FakePublicKey_39(
- this,
- Invocation.method(
- #getDeployKey,
- [slug],
- {#id: id},
- ),
- )),
- ) as _i6.Future<_i5.PublicKey>);
-
- @override
- _i6.Future<_i5.PublicKey> createDeployKey(
- _i5.RepositorySlug? slug,
- _i5.CreatePublicKey? key,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createDeployKey,
- [
- slug,
- key,
- ],
- ),
- returnValue: _i6.Future<_i5.PublicKey>.value(_FakePublicKey_39(
- this,
- Invocation.method(
- #createDeployKey,
- [
- slug,
- key,
- ],
- ),
- )),
- ) as _i6.Future<_i5.PublicKey>);
-
- @override
- _i6.Future<bool> deleteDeployKey({
- required _i5.RepositorySlug? slug,
- required _i5.PublicKey? key,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteDeployKey,
- [],
- {
- #slug: slug,
- #key: key,
- },
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<_i5.RepositoryCommit> merge(
- _i5.RepositorySlug? slug,
- _i5.CreateMerge? merge,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #merge,
- [
- slug,
- merge,
- ],
- ),
- returnValue: _i6.Future<_i5.RepositoryCommit>.value(_FakeRepositoryCommit_33(
- this,
- Invocation.method(
- #merge,
- [
- slug,
- merge,
- ],
- ),
- )),
- ) as _i6.Future<_i5.RepositoryCommit>);
-
- @override
- _i6.Future<_i5.RepositoryPages> getPagesInfo(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getPagesInfo,
- [slug],
- ),
- returnValue: _i6.Future<_i5.RepositoryPages>.value(_FakeRepositoryPages_40(
- this,
- Invocation.method(
- #getPagesInfo,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.RepositoryPages>);
-
- @override
- _i6.Stream<_i5.PageBuild> listPagesBuilds(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listPagesBuilds,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.PageBuild>.empty(),
- ) as _i6.Stream<_i5.PageBuild>);
-
- @override
- _i6.Future<_i5.PageBuild> getLatestPagesBuild(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getLatestPagesBuild,
- [slug],
- ),
- returnValue: _i6.Future<_i5.PageBuild>.value(_FakePageBuild_41(
- this,
- Invocation.method(
- #getLatestPagesBuild,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.PageBuild>);
-
- @override
- _i6.Stream<_i5.Release> listReleases(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listReleases,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.Release>.empty(),
- ) as _i6.Stream<_i5.Release>);
-
- @override
- _i6.Future<_i5.Release> getLatestRelease(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getLatestRelease,
- [slug],
- ),
- returnValue: _i6.Future<_i5.Release>.value(_FakeRelease_42(
- this,
- Invocation.method(
- #getLatestRelease,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.Release>);
-
- @override
- _i6.Future<_i5.Release> getReleaseById(
- _i5.RepositorySlug? slug,
- int? id,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReleaseById,
- [
- slug,
- id,
- ],
- ),
- returnValue: _i6.Future<_i5.Release>.value(_FakeRelease_42(
- this,
- Invocation.method(
- #getReleaseById,
- [
- slug,
- id,
- ],
- ),
- )),
- ) as _i6.Future<_i5.Release>);
-
- @override
- _i6.Future<_i5.Release> getReleaseByTagName(
- _i5.RepositorySlug? slug,
- String? tagName,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReleaseByTagName,
- [
- slug,
- tagName,
- ],
- ),
- returnValue: _i6.Future<_i5.Release>.value(_FakeRelease_42(
- this,
- Invocation.method(
- #getReleaseByTagName,
- [
- slug,
- tagName,
- ],
- ),
- )),
- ) as _i6.Future<_i5.Release>);
-
- @override
- _i6.Future<_i5.Release> createRelease(
- _i5.RepositorySlug? slug,
- _i5.CreateRelease? createRelease, {
- bool? getIfExists = true,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #createRelease,
- [
- slug,
- createRelease,
- ],
- {#getIfExists: getIfExists},
- ),
- returnValue: _i6.Future<_i5.Release>.value(_FakeRelease_42(
- this,
- Invocation.method(
- #createRelease,
- [
- slug,
- createRelease,
- ],
- {#getIfExists: getIfExists},
- ),
- )),
- ) as _i6.Future<_i5.Release>);
-
- @override
- _i6.Future<_i5.Release> editRelease(
- _i5.RepositorySlug? slug,
- _i5.Release? releaseToEdit, {
- String? tagName,
- String? targetCommitish,
- String? name,
- String? body,
- bool? draft,
- bool? preRelease,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editRelease,
- [
- slug,
- releaseToEdit,
- ],
- {
- #tagName: tagName,
- #targetCommitish: targetCommitish,
- #name: name,
- #body: body,
- #draft: draft,
- #preRelease: preRelease,
- },
- ),
- returnValue: _i6.Future<_i5.Release>.value(_FakeRelease_42(
- this,
- Invocation.method(
- #editRelease,
- [
- slug,
- releaseToEdit,
- ],
- {
- #tagName: tagName,
- #targetCommitish: targetCommitish,
- #name: name,
- #body: body,
- #draft: draft,
- #preRelease: preRelease,
- },
- ),
- )),
- ) as _i6.Future<_i5.Release>);
-
- @override
- _i6.Future<bool> deleteRelease(
- _i5.RepositorySlug? slug,
- _i5.Release? release,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteRelease,
- [
- slug,
- release,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Stream<_i5.ReleaseAsset> listReleaseAssets(
- _i5.RepositorySlug? slug,
- _i5.Release? release,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listReleaseAssets,
- [
- slug,
- release,
- ],
- ),
- returnValue: _i6.Stream<_i5.ReleaseAsset>.empty(),
- ) as _i6.Stream<_i5.ReleaseAsset>);
-
- @override
- _i6.Future<_i5.ReleaseAsset> getReleaseAsset(
- _i5.RepositorySlug? slug,
- _i5.Release? release, {
- required int? assetId,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #getReleaseAsset,
- [
- slug,
- release,
- ],
- {#assetId: assetId},
- ),
- returnValue: _i6.Future<_i5.ReleaseAsset>.value(_FakeReleaseAsset_43(
- this,
- Invocation.method(
- #getReleaseAsset,
- [
- slug,
- release,
- ],
- {#assetId: assetId},
- ),
- )),
- ) as _i6.Future<_i5.ReleaseAsset>);
-
- @override
- _i6.Future<_i5.ReleaseAsset> editReleaseAsset(
- _i5.RepositorySlug? slug,
- _i5.ReleaseAsset? assetToEdit, {
- String? name,
- String? label,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #editReleaseAsset,
- [
- slug,
- assetToEdit,
- ],
- {
- #name: name,
- #label: label,
- },
- ),
- returnValue: _i6.Future<_i5.ReleaseAsset>.value(_FakeReleaseAsset_43(
- this,
- Invocation.method(
- #editReleaseAsset,
- [
- slug,
- assetToEdit,
- ],
- {
- #name: name,
- #label: label,
- },
- ),
- )),
- ) as _i6.Future<_i5.ReleaseAsset>);
-
- @override
- _i6.Future<bool> deleteReleaseAsset(
- _i5.RepositorySlug? slug,
- _i5.ReleaseAsset? asset,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #deleteReleaseAsset,
- [
- slug,
- asset,
- ],
- ),
- returnValue: _i6.Future<bool>.value(false),
- ) as _i6.Future<bool>);
-
- @override
- _i6.Future<List<_i5.ReleaseAsset>> uploadReleaseAssets(
- _i5.Release? release,
- Iterable<_i5.CreateReleaseAsset>? createReleaseAssets,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #uploadReleaseAssets,
- [
- release,
- createReleaseAssets,
- ],
- ),
- returnValue: _i6.Future<List<_i5.ReleaseAsset>>.value(<_i5.ReleaseAsset>[]),
- ) as _i6.Future<List<_i5.ReleaseAsset>>);
-
- @override
- _i6.Future<List<_i5.ContributorStatistics>> listContributorStats(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listContributorStats,
- [slug],
- ),
- returnValue: _i6.Future<List<_i5.ContributorStatistics>>.value(<_i5.ContributorStatistics>[]),
- ) as _i6.Future<List<_i5.ContributorStatistics>>);
-
- @override
- _i6.Stream<_i5.YearCommitCountWeek> listCommitActivity(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCommitActivity,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.YearCommitCountWeek>.empty(),
- ) as _i6.Stream<_i5.YearCommitCountWeek>);
-
- @override
- _i6.Stream<_i5.WeeklyChangesCount> listCodeFrequency(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listCodeFrequency,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.WeeklyChangesCount>.empty(),
- ) as _i6.Stream<_i5.WeeklyChangesCount>);
-
- @override
- _i6.Future<_i5.ContributorParticipation> getParticipation(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #getParticipation,
- [slug],
- ),
- returnValue: _i6.Future<_i5.ContributorParticipation>.value(_FakeContributorParticipation_44(
- this,
- Invocation.method(
- #getParticipation,
- [slug],
- ),
- )),
- ) as _i6.Future<_i5.ContributorParticipation>);
-
- @override
- _i6.Stream<_i5.PunchcardEntry> listPunchcard(_i5.RepositorySlug? slug) => (super.noSuchMethod(
- Invocation.method(
- #listPunchcard,
- [slug],
- ),
- returnValue: _i6.Stream<_i5.PunchcardEntry>.empty(),
- ) as _i6.Stream<_i5.PunchcardEntry>);
-
- @override
- _i6.Stream<_i5.RepositoryStatus> listStatuses(
- _i5.RepositorySlug? slug,
- String? ref,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #listStatuses,
- [
- slug,
- ref,
- ],
- ),
- returnValue: _i6.Stream<_i5.RepositoryStatus>.empty(),
- ) as _i6.Stream<_i5.RepositoryStatus>);
-
- @override
- _i6.Future<_i5.RepositoryStatus> createStatus(
- _i5.RepositorySlug? slug,
- String? ref,
- _i5.CreateStatus? request,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #createStatus,
- [
- slug,
- ref,
- request,
- ],
- ),
- returnValue: _i6.Future<_i5.RepositoryStatus>.value(_FakeRepositoryStatus_45(
- this,
- Invocation.method(
- #createStatus,
- [
- slug,
- ref,
- request,
- ],
- ),
- )),
- ) as _i6.Future<_i5.RepositoryStatus>);
-
- @override
- _i6.Future<_i5.CombinedRepositoryStatus> getCombinedStatus(
- _i5.RepositorySlug? slug,
- String? ref,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #getCombinedStatus,
- [
- slug,
- ref,
- ],
- ),
- returnValue: _i6.Future<_i5.CombinedRepositoryStatus>.value(_FakeCombinedRepositoryStatus_46(
- this,
- Invocation.method(
- #getCombinedStatus,
- [
- slug,
- ref,
- ],
- ),
- )),
- ) as _i6.Future<_i5.CombinedRepositoryStatus>);
-
- @override
- _i6.Future<_i5.ReleaseNotes> generateReleaseNotes(_i5.CreateReleaseNotes? crn) => (super.noSuchMethod(
- Invocation.method(
- #generateReleaseNotes,
- [crn],
- ),
- returnValue: _i6.Future<_i5.ReleaseNotes>.value(_FakeReleaseNotes_47(
- this,
- Invocation.method(
- #generateReleaseNotes,
- [crn],
- ),
- )),
- ) as _i6.Future<_i5.ReleaseNotes>);
-}
-
-/// A class which mocks [GitHubComparison].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockGitHubComparison extends _i1.Mock implements _i5.GitHubComparison {
- MockGitHubComparison() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- set url(String? _url) => super.noSuchMethod(
- Invocation.setter(
- #url,
- _url,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- set status(String? _status) => super.noSuchMethod(
- Invocation.setter(
- #status,
- _status,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- set aheadBy(int? _aheadBy) => super.noSuchMethod(
- Invocation.setter(
- #aheadBy,
- _aheadBy,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- set behindBy(int? _behindBy) => super.noSuchMethod(
- Invocation.setter(
- #behindBy,
- _behindBy,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- set totalCommits(int? _totalCommits) => super.noSuchMethod(
- Invocation.setter(
- #totalCommits,
- _totalCommits,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- set files(List<_i5.CommitFile>? _files) => super.noSuchMethod(
- Invocation.setter(
- #files,
- _files,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- set commits(List<_i5.RepositoryCommit>? _commits) => super.noSuchMethod(
- Invocation.setter(
- #commits,
- _commits,
- ),
- returnValueForMissingStub: null,
- );
-
- @override
- Map<String, dynamic> toJson() => (super.noSuchMethod(
- Invocation.method(
- #toJson,
- [],
- ),
- returnValue: <String, dynamic>{},
- ) as Map<String, dynamic>);
-}
-
-/// A class which mocks [Response].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockResponse extends _i1.Mock implements _i2.Response {
- MockResponse() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i11.Uint8List get bodyBytes => (super.noSuchMethod(
- Invocation.getter(#bodyBytes),
- returnValue: _i11.Uint8List(0),
- ) as _i11.Uint8List);
-
- @override
- String get body => (super.noSuchMethod(
- Invocation.getter(#body),
- returnValue: _i10.dummyValue<String>(
- this,
- Invocation.getter(#body),
- ),
- ) as String);
-
- @override
- int get statusCode => (super.noSuchMethod(
- Invocation.getter(#statusCode),
- returnValue: 0,
- ) as int);
-
- @override
- Map<String, String> get headers => (super.noSuchMethod(
- Invocation.getter(#headers),
- returnValue: <String, String>{},
- ) as Map<String, String>);
-
- @override
- bool get isRedirect => (super.noSuchMethod(
- Invocation.getter(#isRedirect),
- returnValue: false,
- ) as bool);
-
- @override
- bool get persistentConnection => (super.noSuchMethod(
- Invocation.getter(#persistentConnection),
- returnValue: false,
- ) as bool);
+ returnValue: _i4.Future<void>.value(),
+ returnValueForMissingStub: _i4.Future<void>.value(),
+ ) as _i4.Future<void>);
}
diff --git a/auto_submit/test/validations/approval_test.dart b/auto_submit/test/validations/approval_test.dart
index 175757c..df58fdc 100644
--- a/auto_submit/test/validations/approval_test.dart
+++ b/auto_submit/test/validations/approval_test.dart
@@ -9,6 +9,7 @@
import 'package:auto_submit/validations/approval.dart';
import 'package:auto_submit/validations/validation.dart';
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import 'package:github/github.dart' as gh;
import '../configuration/repository_configuration_data.dart';
@@ -16,7 +17,6 @@
import '../src/service/fake_config.dart';
import '../src/service/fake_github_service.dart';
import '../src/service/fake_graphql_client.dart';
-import '../utilities/mocks.mocks.dart';
import 'approval_test_data.dart';
void main() {
diff --git a/auto_submit/test/validations/ci_successful_test.dart b/auto_submit/test/validations/ci_successful_test.dart
index c7b16a1..e648cbd 100644
--- a/auto_submit/test/validations/ci_successful_test.dart
+++ b/auto_submit/test/validations/ci_successful_test.dart
@@ -17,9 +17,9 @@
import 'package:auto_submit/validations/validation.dart';
import 'package:auto_submit/configuration/repository_configuration.dart';
import 'package:auto_submit/service/log.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../utilities/utils.dart';
-import '../utilities/mocks.dart';
import '../src/service/fake_config.dart';
import '../src/service/fake_github_service.dart';
import '../src/service/fake_graphql_client.dart';
diff --git a/auto_submit/test/validations/mergeable_test.dart b/auto_submit/test/validations/mergeable_test.dart
index a75c206..1deb8b0 100644
--- a/auto_submit/test/validations/mergeable_test.dart
+++ b/auto_submit/test/validations/mergeable_test.dart
@@ -7,12 +7,12 @@
import 'package:auto_submit/validations/validation.dart';
import 'package:github/github.dart' as github;
import 'package:test/test.dart';
+import 'package:cocoon_server/testing/mocks.dart';
import '../requests/github_webhook_test_data.dart';
import '../src/service/fake_config.dart';
import '../src/service/fake_github_service.dart';
import '../src/service/fake_graphql_client.dart';
-import '../utilities/mocks.dart';
import '../utilities/utils.dart';
void main() {
diff --git a/cocoon_server/README.md b/cocoon_server/README.md
new file mode 100644
index 0000000..e21432c
--- /dev/null
+++ b/cocoon_server/README.md
@@ -0,0 +1,2 @@
+This package contains server-side functionality shared between `app_dart` and
+`auto_submit`. It is not intended to be published to pub.dev.
diff --git a/cocoon_server/analysis_options.yaml b/cocoon_server/analysis_options.yaml
new file mode 100644
index 0000000..f4cf71f
--- /dev/null
+++ b/cocoon_server/analysis_options.yaml
@@ -0,0 +1,8 @@
+include: ../analysis_options.yaml
+
+linter:
+ rules:
+ # a few rules listed below are the ones we would like to exclude from flutter_lint package, for app_dart
+ # reasons for exclusions are provided in the comments to the right
+ avoid_print: false # we have necessary print calls in the code
+ constant_identifier_names: false # we have all capitalized enums in check_for_waiting_pull_requests_test.dart
diff --git a/cocoon_server/build.yaml b/cocoon_server/build.yaml
new file mode 100644
index 0000000..ab0c0b8
--- /dev/null
+++ b/cocoon_server/build.yaml
@@ -0,0 +1,25 @@
+targets:
+ $default:
+ sources:
+ - $package$
+ - lib/$lib$
+ - lib/**.dart
+ - test/**.dart
+ builders:
+ json_serializable:
+ generate_for:
+ - test/**.dart
+ - lib/**.dart
+ options:
+ # Options configure how source code is generated for every
+ # `@JsonSerializable`-annotated class in the package.
+ field_rename: snake
+ source_gen|combining_builder:
+ options:
+ ignore_for_file:
+ - always_specify_types
+ - implicit_dynamic_parameter
+ mockito|mockBuilder:
+ generate_for:
+ - test/**.dart
+ - lib/**.dart
diff --git a/app_dart/lib/src/service/access_client_provider.dart b/cocoon_server/lib/access_client_provider.dart
similarity index 100%
rename from app_dart/lib/src/service/access_client_provider.dart
rename to cocoon_server/lib/access_client_provider.dart
diff --git a/auto_submit/lib/model/big_query_pull_request_record.dart b/cocoon_server/lib/big_query_pull_request_record.dart
similarity index 100%
rename from auto_submit/lib/model/big_query_pull_request_record.dart
rename to cocoon_server/lib/big_query_pull_request_record.dart
diff --git a/auto_submit/lib/model/big_query_pull_request_record.g.dart b/cocoon_server/lib/big_query_pull_request_record.g.dart
similarity index 92%
rename from auto_submit/lib/model/big_query_pull_request_record.g.dart
rename to cocoon_server/lib/big_query_pull_request_record.g.dart
index c860409..f16bdfc 100644
--- a/auto_submit/lib/model/big_query_pull_request_record.g.dart
+++ b/cocoon_server/lib/big_query_pull_request_record.g.dart
@@ -1,5 +1,7 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
+// ignore_for_file: always_specify_types, implicit_dynamic_parameter
+
part of 'big_query_pull_request_record.dart';
// **************************************************************************
@@ -14,7 +16,7 @@
organization: json['organization'] as String?,
repository: json['repository'] as String?,
author: json['author'] as String?,
- prNumber: (json['pr_number'] as num?)?.toInt(),
+ prNumber: json['pr_number'] as int?,
prCommit: json['pr_commit'] as String?,
prRequestType: json['pr_request_type'] as String?,
);
diff --git a/auto_submit/lib/service/bigquery.dart b/cocoon_server/lib/bigquery.dart
similarity index 93%
rename from auto_submit/lib/service/bigquery.dart
rename to cocoon_server/lib/bigquery.dart
index acdc88f..3d66579 100644
--- a/auto_submit/lib/service/bigquery.dart
+++ b/cocoon_server/lib/bigquery.dart
@@ -4,11 +4,10 @@
import 'dart:async';
-import 'package:auto_submit/exception/bigquery_exception.dart';
-import 'package:auto_submit/model/big_query_pull_request_record.dart';
import 'package:googleapis/bigquery/v2.dart';
import 'package:http/http.dart';
+import 'big_query_pull_request_record.dart';
import 'access_client_provider.dart';
const String _insertPullRequestDml = r'''
@@ -133,3 +132,13 @@
);
}
}
+
+class BigQueryException implements Exception {
+ /// Create a custom exception for Big Query Errors.
+ BigQueryException(this.cause);
+
+ final String cause;
+
+ @override
+ String toString() => cause;
+}
diff --git a/cocoon_server/lib/testing/bigquery_testing.dart b/cocoon_server/lib/testing/bigquery_testing.dart
new file mode 100644
index 0000000..5677062
--- /dev/null
+++ b/cocoon_server/lib/testing/bigquery_testing.dart
@@ -0,0 +1,185 @@
+import 'package:googleapis/bigquery/v2.dart';
+
+import '../bigquery.dart';
+import 'mocks.dart';
+
+const String revertRequestRecordResponse = '''
+{
+ "jobComplete": true,
+ "rows": [
+ { "f": [
+ { "v": "flutter"},
+ { "v": "cocoon" },
+ { "v": "ricardoamador" },
+ { "v": "1024" },
+ { "v": "123f124" },
+ { "v": "123456789" },
+ { "v": "123456999" },
+ { "v": "ricardoamador" },
+ { "v": "2048" },
+ { "v": "ce345dc" },
+ { "v": "234567890" },
+ { "v": "234567999" },
+ { "v": "ricardoamador" },
+ { "v": "11304" },
+ { "v": "1640979000000" },
+ { "v": "0" },
+ { "v": "" }
+ ]
+ }
+ ]
+}
+''';
+
+const String pullRequestRecordResponse = '''
+{
+ "jobComplete": true,
+ "rows": [
+ { "f": [
+ { "v": "123456789"},
+ { "v": "234567890" },
+ { "v": "flutter" },
+ { "v": "cocoon" },
+ { "v": "ricardoamador" },
+ { "v": "345" },
+ { "v": "ade456" },
+ { "v": "merge" }
+ ]
+ }
+ ]
+}
+''';
+
+const String successResponseNoRowsAffected = '''
+{
+ "jobComplete": true
+}
+''';
+
+const String insertDeleteUpdateSuccessResponse = '''
+{
+ "jobComplete": true,
+ "numDmlAffectedRows": "1"
+}
+''';
+
+const String insertDeleteUpdateSuccessTooManyRows = '''
+{
+ "jobComplete": true,
+ "numDmlAffectedRows": "2"
+}
+''';
+
+const String selectPullRequestTooManyRowsResponse = '''
+{
+ "jobComplete": true,
+ "numDmlAffectedRows": "2",
+ "rows": [
+ { "f": [
+ { "v": "123456789"},
+ { "v": "234567890" },
+ { "v": "flutter" },
+ { "v": "cocoon" },
+ { "v": "ricardoamador" },
+ { "v": "345" },
+ { "v": "ade456" },
+ { "v": "merge" }
+ ]
+ },
+ { "f": [
+ { "v": "123456789"},
+ { "v": "234567890" },
+ { "v": "flutter" },
+ { "v": "cocoon" },
+ { "v": "ricardoamador" },
+ { "v": "345" },
+ { "v": "ade456" },
+ { "v": "merge" }
+ ]
+ }
+ ]
+}
+''';
+
+const String selectRevertRequestTooManyRowsResponse = '''
+{
+ "jobComplete": true,
+ "numDmlAffectedRows": "2",
+ "rows": [
+ { "f": [
+ { "v": "flutter"},
+ { "v": "cocoon" },
+ { "v": "ricardoamador" },
+ { "v": "1024" },
+ { "v": "123f124" },
+ { "v": "123456789" },
+ { "v": "123456999" },
+ { "v": "ricardoamador" },
+ { "v": "2048" },
+ { "v": "ce345dc" },
+ { "v": "234567890" },
+ { "v": "234567999" }
+ ]
+ },
+ { "f": [
+ { "v": "flutter"},
+ { "v": "cocoon" },
+ { "v": "ricardoamador" },
+ { "v": "1024" },
+ { "v": "123f124" },
+ { "v": "123456789" },
+ { "v": "123456999" },
+ { "v": "ricardoamador" },
+ { "v": "2048" },
+ { "v": "ce345dc" },
+ { "v": "234567890" },
+ { "v": "234567999" }
+ ]
+ }
+ ]
+}
+''';
+
+const String errorResponse = '''
+{
+ "jobComplete": false
+}
+''';
+
+const String selectReviewRequestRecordsResponse = '''
+{
+ "jobComplete": true,
+ "numDmlAffectedRows": "2",
+ "rows": [
+ { "f": [
+ { "v": "Keyonghan" },
+ { "v": "2048" },
+ { "v": "234567890" },
+ { "v": "0" },
+ { "v": "" }
+ ]
+ },
+ { "f": [
+ { "v": "caseyhillers" },
+ { "v": "2049" },
+ { "v": "234567890" },
+ { "v": "0" },
+ { "v": "" }
+ ]
+ }
+ ]
+}
+''';
+
+const String expectedProjectId = 'flutter-dashboard';
+
+class FakeBigqueryService extends BigqueryService {
+ FakeBigqueryService(this.jobsResource) : super(MockAccessClientProvider());
+
+ JobsResource jobsResource;
+
+ @override
+ Future<JobsResource> defaultJobs() async {
+ return jobsResource;
+ }
+}
diff --git a/cocoon_server/lib/testing/mocks.dart b/cocoon_server/lib/testing/mocks.dart
new file mode 100644
index 0000000..b594cfd
--- /dev/null
+++ b/cocoon_server/lib/testing/mocks.dart
@@ -0,0 +1,22 @@
+// Copyright 2022 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import '../access_client_provider.dart';
+import 'package:github/github.dart';
+import 'package:googleapis/bigquery/v2.dart';
+import 'package:mockito/annotations.dart';
+import 'package:http/http.dart' as http;
+
+export 'mocks.mocks.dart';
+
+@GenerateMocks(<Type>[
+ AccessClientProvider,
+ JobsResource,
+ GitHub,
+ PullRequestsService,
+ RepositoriesService,
+ GitHubComparison,
+ http.Response,
+])
+void main() {}
diff --git a/cocoon_server/lib/testing/mocks.mocks.dart b/cocoon_server/lib/testing/mocks.mocks.dart
new file mode 100644
index 0000000..000dccb
--- /dev/null
+++ b/cocoon_server/lib/testing/mocks.mocks.dart
@@ -0,0 +1,3283 @@
+// Mocks generated by Mockito 5.4.4 from annotations
+// in cocoon_server/testing/mocks.dart.
+// Do not manually edit this file.
+
+// ignore_for_file: no_leading_underscores_for_library_prefixes
+import 'dart:async' as _i5;
+import 'dart:typed_data' as _i9;
+
+import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as _i7;
+import 'package:cocoon_server/access_client_provider.dart' as _i6;
+import 'package:github/src/common.dart' as _i4;
+import 'package:googleapis/bigquery/v2.dart' as _i3;
+import 'package:http/http.dart' as _i2;
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:mockito/src/dummies.dart' as _i8;
+
+// ignore_for_file: type=lint
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: deprecated_member_use
+// ignore_for_file: deprecated_member_use_from_same_package
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+// ignore_for_file: camel_case_types
+// ignore_for_file: subtype_of_sealed_class
+
+class _FakeClient_0 extends _i1.SmartFake implements _i2.Client {
+ _FakeClient_0(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeJobCancelResponse_1 extends _i1.SmartFake implements _i3.JobCancelResponse {
+ _FakeJobCancelResponse_1(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeJob_2 extends _i1.SmartFake implements _i3.Job {
+ _FakeJob_2(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeGetQueryResultsResponse_3 extends _i1.SmartFake implements _i3.GetQueryResultsResponse {
+ _FakeGetQueryResultsResponse_3(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeJobList_4 extends _i1.SmartFake implements _i3.JobList {
+ _FakeJobList_4(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeQueryResponse_5 extends _i1.SmartFake implements _i3.QueryResponse {
+ _FakeQueryResponse_5(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeAuthentication_6 extends _i1.SmartFake implements _i4.Authentication {
+ _FakeAuthentication_6(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeActivityService_7 extends _i1.SmartFake implements _i4.ActivityService {
+ _FakeActivityService_7(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeAuthorizationsService_8 extends _i1.SmartFake implements _i4.AuthorizationsService {
+ _FakeAuthorizationsService_8(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeGistsService_9 extends _i1.SmartFake implements _i4.GistsService {
+ _FakeGistsService_9(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeGitService_10 extends _i1.SmartFake implements _i4.GitService {
+ _FakeGitService_10(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeIssuesService_11 extends _i1.SmartFake implements _i4.IssuesService {
+ _FakeIssuesService_11(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeMiscService_12 extends _i1.SmartFake implements _i4.MiscService {
+ _FakeMiscService_12(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeOrganizationsService_13 extends _i1.SmartFake implements _i4.OrganizationsService {
+ _FakeOrganizationsService_13(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePullRequestsService_14 extends _i1.SmartFake implements _i4.PullRequestsService {
+ _FakePullRequestsService_14(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRepositoriesService_15 extends _i1.SmartFake implements _i4.RepositoriesService {
+ _FakeRepositoriesService_15(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeSearchService_16 extends _i1.SmartFake implements _i4.SearchService {
+ _FakeSearchService_16(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeUrlShortenerService_17 extends _i1.SmartFake implements _i4.UrlShortenerService {
+ _FakeUrlShortenerService_17(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeUsersService_18 extends _i1.SmartFake implements _i4.UsersService {
+ _FakeUsersService_18(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeChecksService_19 extends _i1.SmartFake implements _i4.ChecksService {
+ _FakeChecksService_19(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeFuture_20<T1> extends _i1.SmartFake implements _i5.Future<T1> {
+ _FakeFuture_20(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeResponse_21 extends _i1.SmartFake implements _i2.Response {
+ _FakeResponse_21(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeGitHub_22 extends _i1.SmartFake implements _i4.GitHub {
+ _FakeGitHub_22(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePullRequest_23 extends _i1.SmartFake implements _i4.PullRequest {
+ _FakePullRequest_23(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePullRequestMerge_24 extends _i1.SmartFake implements _i4.PullRequestMerge {
+ _FakePullRequestMerge_24(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePullRequestComment_25 extends _i1.SmartFake implements _i4.PullRequestComment {
+ _FakePullRequestComment_25(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePullRequestReview_26 extends _i1.SmartFake implements _i4.PullRequestReview {
+ _FakePullRequestReview_26(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRepository_27 extends _i1.SmartFake implements _i4.Repository {
+ _FakeRepository_27(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeLicenseDetails_28 extends _i1.SmartFake implements _i4.LicenseDetails {
+ _FakeLicenseDetails_28(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeLanguageBreakdown_29 extends _i1.SmartFake implements _i4.LanguageBreakdown {
+ _FakeLanguageBreakdown_29(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeBranch_30 extends _i1.SmartFake implements _i4.Branch {
+ _FakeBranch_30(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeCommitComment_31 extends _i1.SmartFake implements _i4.CommitComment {
+ _FakeCommitComment_31(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRepositoryCommit_32 extends _i1.SmartFake implements _i4.RepositoryCommit {
+ _FakeRepositoryCommit_32(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeGitHubComparison_33 extends _i1.SmartFake implements _i4.GitHubComparison {
+ _FakeGitHubComparison_33(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeGitHubFile_34 extends _i1.SmartFake implements _i4.GitHubFile {
+ _FakeGitHubFile_34(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRepositoryContents_35 extends _i1.SmartFake implements _i4.RepositoryContents {
+ _FakeRepositoryContents_35(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeContentCreation_36 extends _i1.SmartFake implements _i4.ContentCreation {
+ _FakeContentCreation_36(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeHook_37 extends _i1.SmartFake implements _i4.Hook {
+ _FakeHook_37(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePublicKey_38 extends _i1.SmartFake implements _i4.PublicKey {
+ _FakePublicKey_38(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRepositoryPages_39 extends _i1.SmartFake implements _i4.RepositoryPages {
+ _FakeRepositoryPages_39(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakePageBuild_40 extends _i1.SmartFake implements _i4.PageBuild {
+ _FakePageBuild_40(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRelease_41 extends _i1.SmartFake implements _i4.Release {
+ _FakeRelease_41(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeReleaseAsset_42 extends _i1.SmartFake implements _i4.ReleaseAsset {
+ _FakeReleaseAsset_42(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeContributorParticipation_43 extends _i1.SmartFake implements _i4.ContributorParticipation {
+ _FakeContributorParticipation_43(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeRepositoryStatus_44 extends _i1.SmartFake implements _i4.RepositoryStatus {
+ _FakeRepositoryStatus_44(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeCombinedRepositoryStatus_45 extends _i1.SmartFake implements _i4.CombinedRepositoryStatus {
+ _FakeCombinedRepositoryStatus_45(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeReleaseNotes_46 extends _i1.SmartFake implements _i4.ReleaseNotes {
+ _FakeReleaseNotes_46(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+/// A class which mocks [AccessClientProvider].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockAccessClientProvider extends _i1.Mock implements _i6.AccessClientProvider {
+ MockAccessClientProvider() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i5.Future<_i2.Client> createAccessClient({
+ List<String>? scopes = const [r'https://www.googleapis.com/auth/cloud-platform'],
+ _i2.Client? baseClient,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createAccessClient,
+ [],
+ {
+ #scopes: scopes,
+ #baseClient: baseClient,
+ },
+ ),
+ returnValue: _i5.Future<_i2.Client>.value(_FakeClient_0(
+ this,
+ Invocation.method(
+ #createAccessClient,
+ [],
+ {
+ #scopes: scopes,
+ #baseClient: baseClient,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i2.Client>);
+}
+
+/// A class which mocks [JobsResource].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockJobsResource extends _i1.Mock implements _i3.JobsResource {
+ MockJobsResource() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i5.Future<_i3.JobCancelResponse> cancel(
+ String? projectId,
+ String? jobId, {
+ String? location,
+ String? $fields,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #cancel,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #location: location,
+ #$fields: $fields,
+ },
+ ),
+ returnValue: _i5.Future<_i3.JobCancelResponse>.value(_FakeJobCancelResponse_1(
+ this,
+ Invocation.method(
+ #cancel,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #location: location,
+ #$fields: $fields,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i3.JobCancelResponse>);
+
+ @override
+ _i5.Future<void> delete(
+ String? projectId,
+ String? jobId, {
+ String? location,
+ String? $fields,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #delete,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #location: location,
+ #$fields: $fields,
+ },
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<_i3.Job> get(
+ String? projectId,
+ String? jobId, {
+ String? location,
+ String? $fields,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #get,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #location: location,
+ #$fields: $fields,
+ },
+ ),
+ returnValue: _i5.Future<_i3.Job>.value(_FakeJob_2(
+ this,
+ Invocation.method(
+ #get,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #location: location,
+ #$fields: $fields,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i3.Job>);
+
+ @override
+ _i5.Future<_i3.GetQueryResultsResponse> getQueryResults(
+ String? projectId,
+ String? jobId, {
+ bool? formatOptions_useInt64Timestamp,
+ String? location,
+ int? maxResults,
+ String? pageToken,
+ String? startIndex,
+ int? timeoutMs,
+ String? $fields,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getQueryResults,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #formatOptions_useInt64Timestamp: formatOptions_useInt64Timestamp,
+ #location: location,
+ #maxResults: maxResults,
+ #pageToken: pageToken,
+ #startIndex: startIndex,
+ #timeoutMs: timeoutMs,
+ #$fields: $fields,
+ },
+ ),
+ returnValue: _i5.Future<_i3.GetQueryResultsResponse>.value(_FakeGetQueryResultsResponse_3(
+ this,
+ Invocation.method(
+ #getQueryResults,
+ [
+ projectId,
+ jobId,
+ ],
+ {
+ #formatOptions_useInt64Timestamp: formatOptions_useInt64Timestamp,
+ #location: location,
+ #maxResults: maxResults,
+ #pageToken: pageToken,
+ #startIndex: startIndex,
+ #timeoutMs: timeoutMs,
+ #$fields: $fields,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i3.GetQueryResultsResponse>);
+
+ @override
+ _i5.Future<_i3.Job> insert(
+ _i3.Job? request,
+ String? projectId, {
+ String? $fields,
+ _i7.UploadOptions? uploadOptions = _i7.UploadOptions.defaultOptions,
+ _i7.Media? uploadMedia,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #insert,
+ [
+ request,
+ projectId,
+ ],
+ {
+ #$fields: $fields,
+ #uploadOptions: uploadOptions,
+ #uploadMedia: uploadMedia,
+ },
+ ),
+ returnValue: _i5.Future<_i3.Job>.value(_FakeJob_2(
+ this,
+ Invocation.method(
+ #insert,
+ [
+ request,
+ projectId,
+ ],
+ {
+ #$fields: $fields,
+ #uploadOptions: uploadOptions,
+ #uploadMedia: uploadMedia,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i3.Job>);
+
+ @override
+ _i5.Future<_i3.JobList> list(
+ String? projectId, {
+ bool? allUsers,
+ String? maxCreationTime,
+ int? maxResults,
+ String? minCreationTime,
+ String? pageToken,
+ String? parentJobId,
+ String? projection,
+ List<String>? stateFilter,
+ String? $fields,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #list,
+ [projectId],
+ {
+ #allUsers: allUsers,
+ #maxCreationTime: maxCreationTime,
+ #maxResults: maxResults,
+ #minCreationTime: minCreationTime,
+ #pageToken: pageToken,
+ #parentJobId: parentJobId,
+ #projection: projection,
+ #stateFilter: stateFilter,
+ #$fields: $fields,
+ },
+ ),
+ returnValue: _i5.Future<_i3.JobList>.value(_FakeJobList_4(
+ this,
+ Invocation.method(
+ #list,
+ [projectId],
+ {
+ #allUsers: allUsers,
+ #maxCreationTime: maxCreationTime,
+ #maxResults: maxResults,
+ #minCreationTime: minCreationTime,
+ #pageToken: pageToken,
+ #parentJobId: parentJobId,
+ #projection: projection,
+ #stateFilter: stateFilter,
+ #$fields: $fields,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i3.JobList>);
+
+ @override
+ _i5.Future<_i3.QueryResponse> query(
+ _i3.QueryRequest? request,
+ String? projectId, {
+ String? $fields,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #query,
+ [
+ request,
+ projectId,
+ ],
+ {#$fields: $fields},
+ ),
+ returnValue: _i5.Future<_i3.QueryResponse>.value(_FakeQueryResponse_5(
+ this,
+ Invocation.method(
+ #query,
+ [
+ request,
+ projectId,
+ ],
+ {#$fields: $fields},
+ ),
+ )),
+ ) as _i5.Future<_i3.QueryResponse>);
+}
+
+/// A class which mocks [GitHub].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockGitHub extends _i1.Mock implements _i4.GitHub {
+ MockGitHub() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.Authentication get auth => (super.noSuchMethod(
+ Invocation.getter(#auth),
+ returnValue: _FakeAuthentication_6(
+ this,
+ Invocation.getter(#auth),
+ ),
+ ) as _i4.Authentication);
+
+ @override
+ set auth(_i4.Authentication? _auth) => super.noSuchMethod(
+ Invocation.setter(
+ #auth,
+ _auth,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ String get endpoint => (super.noSuchMethod(
+ Invocation.getter(#endpoint),
+ returnValue: _i8.dummyValue<String>(
+ this,
+ Invocation.getter(#endpoint),
+ ),
+ ) as String);
+
+ @override
+ String get version => (super.noSuchMethod(
+ Invocation.getter(#version),
+ returnValue: _i8.dummyValue<String>(
+ this,
+ Invocation.getter(#version),
+ ),
+ ) as String);
+
+ @override
+ _i2.Client get client => (super.noSuchMethod(
+ Invocation.getter(#client),
+ returnValue: _FakeClient_0(
+ this,
+ Invocation.getter(#client),
+ ),
+ ) as _i2.Client);
+
+ @override
+ _i4.ActivityService get activity => (super.noSuchMethod(
+ Invocation.getter(#activity),
+ returnValue: _FakeActivityService_7(
+ this,
+ Invocation.getter(#activity),
+ ),
+ ) as _i4.ActivityService);
+
+ @override
+ _i4.AuthorizationsService get authorizations => (super.noSuchMethod(
+ Invocation.getter(#authorizations),
+ returnValue: _FakeAuthorizationsService_8(
+ this,
+ Invocation.getter(#authorizations),
+ ),
+ ) as _i4.AuthorizationsService);
+
+ @override
+ _i4.GistsService get gists => (super.noSuchMethod(
+ Invocation.getter(#gists),
+ returnValue: _FakeGistsService_9(
+ this,
+ Invocation.getter(#gists),
+ ),
+ ) as _i4.GistsService);
+
+ @override
+ _i4.GitService get git => (super.noSuchMethod(
+ Invocation.getter(#git),
+ returnValue: _FakeGitService_10(
+ this,
+ Invocation.getter(#git),
+ ),
+ ) as _i4.GitService);
+
+ @override
+ _i4.IssuesService get issues => (super.noSuchMethod(
+ Invocation.getter(#issues),
+ returnValue: _FakeIssuesService_11(
+ this,
+ Invocation.getter(#issues),
+ ),
+ ) as _i4.IssuesService);
+
+ @override
+ _i4.MiscService get misc => (super.noSuchMethod(
+ Invocation.getter(#misc),
+ returnValue: _FakeMiscService_12(
+ this,
+ Invocation.getter(#misc),
+ ),
+ ) as _i4.MiscService);
+
+ @override
+ _i4.OrganizationsService get organizations => (super.noSuchMethod(
+ Invocation.getter(#organizations),
+ returnValue: _FakeOrganizationsService_13(
+ this,
+ Invocation.getter(#organizations),
+ ),
+ ) as _i4.OrganizationsService);
+
+ @override
+ _i4.PullRequestsService get pullRequests => (super.noSuchMethod(
+ Invocation.getter(#pullRequests),
+ returnValue: _FakePullRequestsService_14(
+ this,
+ Invocation.getter(#pullRequests),
+ ),
+ ) as _i4.PullRequestsService);
+
+ @override
+ _i4.RepositoriesService get repositories => (super.noSuchMethod(
+ Invocation.getter(#repositories),
+ returnValue: _FakeRepositoriesService_15(
+ this,
+ Invocation.getter(#repositories),
+ ),
+ ) as _i4.RepositoriesService);
+
+ @override
+ _i4.SearchService get search => (super.noSuchMethod(
+ Invocation.getter(#search),
+ returnValue: _FakeSearchService_16(
+ this,
+ Invocation.getter(#search),
+ ),
+ ) as _i4.SearchService);
+
+ @override
+ _i4.UrlShortenerService get urlShortener => (super.noSuchMethod(
+ Invocation.getter(#urlShortener),
+ returnValue: _FakeUrlShortenerService_17(
+ this,
+ Invocation.getter(#urlShortener),
+ ),
+ ) as _i4.UrlShortenerService);
+
+ @override
+ _i4.UsersService get users => (super.noSuchMethod(
+ Invocation.getter(#users),
+ returnValue: _FakeUsersService_18(
+ this,
+ Invocation.getter(#users),
+ ),
+ ) as _i4.UsersService);
+
+ @override
+ _i4.ChecksService get checks => (super.noSuchMethod(
+ Invocation.getter(#checks),
+ returnValue: _FakeChecksService_19(
+ this,
+ Invocation.getter(#checks),
+ ),
+ ) as _i4.ChecksService);
+
+ @override
+ _i5.Future<T> getJSON<S, T>(
+ String? path, {
+ int? statusCode,
+ void Function(_i2.Response)? fail,
+ Map<String, String>? headers,
+ Map<String, String>? params,
+ _i4.JSONConverter<S, T>? convert,
+ String? preview,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #preview: preview,
+ },
+ ),
+ returnValue: _i8.ifNotNull(
+ _i8.dummyValueOrNull<T>(
+ this,
+ Invocation.method(
+ #getJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #preview: preview,
+ },
+ ),
+ ),
+ (T v) => _i5.Future<T>.value(v),
+ ) ??
+ _FakeFuture_20<T>(
+ this,
+ Invocation.method(
+ #getJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #preview: preview,
+ },
+ ),
+ ),
+ ) as _i5.Future<T>);
+
+ @override
+ _i5.Future<T> postJSON<S, T>(
+ String? path, {
+ int? statusCode,
+ void Function(_i2.Response)? fail,
+ Map<String, String>? headers,
+ Map<String, dynamic>? params,
+ _i4.JSONConverter<S, T>? convert,
+ dynamic body,
+ String? preview,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #postJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ returnValue: _i8.ifNotNull(
+ _i8.dummyValueOrNull<T>(
+ this,
+ Invocation.method(
+ #postJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ (T v) => _i5.Future<T>.value(v),
+ ) ??
+ _FakeFuture_20<T>(
+ this,
+ Invocation.method(
+ #postJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ ) as _i5.Future<T>);
+
+ @override
+ _i5.Future<T> putJSON<S, T>(
+ String? path, {
+ int? statusCode,
+ void Function(_i2.Response)? fail,
+ Map<String, String>? headers,
+ Map<String, dynamic>? params,
+ _i4.JSONConverter<S, T>? convert,
+ dynamic body,
+ String? preview,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #putJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ returnValue: _i8.ifNotNull(
+ _i8.dummyValueOrNull<T>(
+ this,
+ Invocation.method(
+ #putJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ (T v) => _i5.Future<T>.value(v),
+ ) ??
+ _FakeFuture_20<T>(
+ this,
+ Invocation.method(
+ #putJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ ) as _i5.Future<T>);
+
+ @override
+ _i5.Future<T> patchJSON<S, T>(
+ String? path, {
+ int? statusCode,
+ void Function(_i2.Response)? fail,
+ Map<String, String>? headers,
+ Map<String, dynamic>? params,
+ _i4.JSONConverter<S, T>? convert,
+ dynamic body,
+ String? preview,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #patchJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ returnValue: _i8.ifNotNull(
+ _i8.dummyValueOrNull<T>(
+ this,
+ Invocation.method(
+ #patchJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ (T v) => _i5.Future<T>.value(v),
+ ) ??
+ _FakeFuture_20<T>(
+ this,
+ Invocation.method(
+ #patchJSON,
+ [path],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ ) as _i5.Future<T>);
+
+ @override
+ _i5.Future<T> requestJson<S, T>(
+ String? method,
+ String? path, {
+ int? statusCode,
+ void Function(_i2.Response)? fail,
+ Map<String, String>? headers,
+ Map<String, dynamic>? params,
+ _i4.JSONConverter<S, T?>? convert,
+ dynamic body,
+ String? preview,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #requestJson,
+ [
+ method,
+ path,
+ ],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ returnValue: _i8.ifNotNull(
+ _i8.dummyValueOrNull<T>(
+ this,
+ Invocation.method(
+ #requestJson,
+ [
+ method,
+ path,
+ ],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ (T v) => _i5.Future<T>.value(v),
+ ) ??
+ _FakeFuture_20<T>(
+ this,
+ Invocation.method(
+ #requestJson,
+ [
+ method,
+ path,
+ ],
+ {
+ #statusCode: statusCode,
+ #fail: fail,
+ #headers: headers,
+ #params: params,
+ #convert: convert,
+ #body: body,
+ #preview: preview,
+ },
+ ),
+ ),
+ ) as _i5.Future<T>);
+
+ @override
+ _i5.Future<_i2.Response> request(
+ String? method,
+ String? path, {
+ Map<String, String>? headers,
+ Map<String, dynamic>? params,
+ dynamic body,
+ int? statusCode,
+ void Function(_i2.Response)? fail,
+ String? preview,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #request,
+ [
+ method,
+ path,
+ ],
+ {
+ #headers: headers,
+ #params: params,
+ #body: body,
+ #statusCode: statusCode,
+ #fail: fail,
+ #preview: preview,
+ },
+ ),
+ returnValue: _i5.Future<_i2.Response>.value(_FakeResponse_21(
+ this,
+ Invocation.method(
+ #request,
+ [
+ method,
+ path,
+ ],
+ {
+ #headers: headers,
+ #params: params,
+ #body: body,
+ #statusCode: statusCode,
+ #fail: fail,
+ #preview: preview,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i2.Response>);
+
+ @override
+ Never handleStatusCode(_i2.Response? response) => (super.noSuchMethod(
+ Invocation.method(
+ #handleStatusCode,
+ [response],
+ ),
+ returnValue: null,
+ ) as Never);
+
+ @override
+ void dispose() => super.noSuchMethod(
+ Invocation.method(
+ #dispose,
+ [],
+ ),
+ returnValueForMissingStub: null,
+ );
+}
+
+/// A class which mocks [PullRequestsService].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockPullRequestsService extends _i1.Mock implements _i4.PullRequestsService {
+ MockPullRequestsService() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.GitHub get github => (super.noSuchMethod(
+ Invocation.getter(#github),
+ returnValue: _FakeGitHub_22(
+ this,
+ Invocation.getter(#github),
+ ),
+ ) as _i4.GitHub);
+
+ @override
+ _i5.Stream<_i4.PullRequest> list(
+ _i4.RepositorySlug? slug, {
+ int? pages,
+ String? base,
+ String? direction = r'desc',
+ String? head,
+ String? sort = r'created',
+ String? state = r'open',
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #list,
+ [slug],
+ {
+ #pages: pages,
+ #base: base,
+ #direction: direction,
+ #head: head,
+ #sort: sort,
+ #state: state,
+ },
+ ),
+ returnValue: _i5.Stream<_i4.PullRequest>.empty(),
+ ) as _i5.Stream<_i4.PullRequest>);
+
+ @override
+ _i5.Future<_i4.PullRequest> get(
+ _i4.RepositorySlug? slug,
+ int? number,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #get,
+ [
+ slug,
+ number,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.PullRequest>.value(_FakePullRequest_23(
+ this,
+ Invocation.method(
+ #get,
+ [
+ slug,
+ number,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.PullRequest>);
+
+ @override
+ _i5.Future<_i4.PullRequest> create(
+ _i4.RepositorySlug? slug,
+ _i4.CreatePullRequest? request,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #create,
+ [
+ slug,
+ request,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.PullRequest>.value(_FakePullRequest_23(
+ this,
+ Invocation.method(
+ #create,
+ [
+ slug,
+ request,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.PullRequest>);
+
+ @override
+ _i5.Future<_i4.PullRequest> edit(
+ _i4.RepositorySlug? slug,
+ int? number, {
+ String? title,
+ String? body,
+ String? state,
+ String? base,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #edit,
+ [
+ slug,
+ number,
+ ],
+ {
+ #title: title,
+ #body: body,
+ #state: state,
+ #base: base,
+ },
+ ),
+ returnValue: _i5.Future<_i4.PullRequest>.value(_FakePullRequest_23(
+ this,
+ Invocation.method(
+ #edit,
+ [
+ slug,
+ number,
+ ],
+ {
+ #title: title,
+ #body: body,
+ #state: state,
+ #base: base,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.PullRequest>);
+
+ @override
+ _i5.Stream<_i4.RepositoryCommit> listCommits(
+ _i4.RepositorySlug? slug,
+ int? number,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listCommits,
+ [
+ slug,
+ number,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.RepositoryCommit>.empty(),
+ ) as _i5.Stream<_i4.RepositoryCommit>);
+
+ @override
+ _i5.Stream<_i4.PullRequestFile> listFiles(
+ _i4.RepositorySlug? slug,
+ int? number,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listFiles,
+ [
+ slug,
+ number,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.PullRequestFile>.empty(),
+ ) as _i5.Stream<_i4.PullRequestFile>);
+
+ @override
+ _i5.Stream<_i4.PullRequestReview> listReviews(
+ _i4.RepositorySlug? slug,
+ int? number,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listReviews,
+ [
+ slug,
+ number,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.PullRequestReview>.empty(),
+ ) as _i5.Stream<_i4.PullRequestReview>);
+
+ @override
+ _i5.Future<bool> isMerged(
+ _i4.RepositorySlug? slug,
+ int? number,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #isMerged,
+ [
+ slug,
+ number,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<_i4.PullRequestMerge> merge(
+ _i4.RepositorySlug? slug,
+ int? number, {
+ String? message,
+ _i4.MergeMethod? mergeMethod = _i4.MergeMethod.merge,
+ String? requestSha,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #merge,
+ [
+ slug,
+ number,
+ ],
+ {
+ #message: message,
+ #mergeMethod: mergeMethod,
+ #requestSha: requestSha,
+ },
+ ),
+ returnValue: _i5.Future<_i4.PullRequestMerge>.value(_FakePullRequestMerge_24(
+ this,
+ Invocation.method(
+ #merge,
+ [
+ slug,
+ number,
+ ],
+ {
+ #message: message,
+ #mergeMethod: mergeMethod,
+ #requestSha: requestSha,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.PullRequestMerge>);
+
+ @override
+ _i5.Stream<_i4.PullRequestComment> listCommentsByPullRequest(
+ _i4.RepositorySlug? slug,
+ int? number,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listCommentsByPullRequest,
+ [
+ slug,
+ number,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.PullRequestComment>.empty(),
+ ) as _i5.Stream<_i4.PullRequestComment>);
+
+ @override
+ _i5.Stream<_i4.PullRequestComment> listComments(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listComments,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.PullRequestComment>.empty(),
+ ) as _i5.Stream<_i4.PullRequestComment>);
+
+ @override
+ _i5.Future<_i4.PullRequestComment> createComment(
+ _i4.RepositorySlug? slug,
+ int? number,
+ _i4.CreatePullRequestComment? comment,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createComment,
+ [
+ slug,
+ number,
+ comment,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.PullRequestComment>.value(_FakePullRequestComment_25(
+ this,
+ Invocation.method(
+ #createComment,
+ [
+ slug,
+ number,
+ comment,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.PullRequestComment>);
+
+ @override
+ _i5.Future<_i4.PullRequestReview> createReview(
+ _i4.RepositorySlug? slug,
+ _i4.CreatePullRequestReview? review,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createReview,
+ [
+ slug,
+ review,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.PullRequestReview>.value(_FakePullRequestReview_26(
+ this,
+ Invocation.method(
+ #createReview,
+ [
+ slug,
+ review,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.PullRequestReview>);
+}
+
+/// A class which mocks [RepositoriesService].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockRepositoriesService extends _i1.Mock implements _i4.RepositoriesService {
+ MockRepositoriesService() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.GitHub get github => (super.noSuchMethod(
+ Invocation.getter(#github),
+ returnValue: _FakeGitHub_22(
+ this,
+ Invocation.getter(#github),
+ ),
+ ) as _i4.GitHub);
+
+ @override
+ _i5.Stream<_i4.Repository> listRepositories({
+ String? type = r'owner',
+ String? sort = r'full_name',
+ String? direction = r'asc',
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listRepositories,
+ [],
+ {
+ #type: type,
+ #sort: sort,
+ #direction: direction,
+ },
+ ),
+ returnValue: _i5.Stream<_i4.Repository>.empty(),
+ ) as _i5.Stream<_i4.Repository>);
+
+ @override
+ _i5.Stream<_i4.Repository> listUserRepositories(
+ String? user, {
+ String? type = r'owner',
+ String? sort = r'full_name',
+ String? direction = r'asc',
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listUserRepositories,
+ [user],
+ {
+ #type: type,
+ #sort: sort,
+ #direction: direction,
+ },
+ ),
+ returnValue: _i5.Stream<_i4.Repository>.empty(),
+ ) as _i5.Stream<_i4.Repository>);
+
+ @override
+ _i5.Stream<_i4.Repository> listOrganizationRepositories(
+ String? org, {
+ String? type = r'all',
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listOrganizationRepositories,
+ [org],
+ {#type: type},
+ ),
+ returnValue: _i5.Stream<_i4.Repository>.empty(),
+ ) as _i5.Stream<_i4.Repository>);
+
+ @override
+ _i5.Stream<_i4.Repository> listPublicRepositories({
+ int? limit = 50,
+ DateTime? since,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listPublicRepositories,
+ [],
+ {
+ #limit: limit,
+ #since: since,
+ },
+ ),
+ returnValue: _i5.Stream<_i4.Repository>.empty(),
+ ) as _i5.Stream<_i4.Repository>);
+
+ @override
+ _i5.Future<_i4.Repository> createRepository(
+ _i4.CreateRepository? repository, {
+ String? org,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createRepository,
+ [repository],
+ {#org: org},
+ ),
+ returnValue: _i5.Future<_i4.Repository>.value(_FakeRepository_27(
+ this,
+ Invocation.method(
+ #createRepository,
+ [repository],
+ {#org: org},
+ ),
+ )),
+ ) as _i5.Future<_i4.Repository>);
+
+ @override
+ _i5.Future<_i4.LicenseDetails> getLicense(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #getLicense,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.LicenseDetails>.value(_FakeLicenseDetails_28(
+ this,
+ Invocation.method(
+ #getLicense,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.LicenseDetails>);
+
+ @override
+ _i5.Future<_i4.Repository> getRepository(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #getRepository,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.Repository>.value(_FakeRepository_27(
+ this,
+ Invocation.method(
+ #getRepository,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.Repository>);
+
+ @override
+ _i5.Stream<_i4.Repository> getRepositories(List<_i4.RepositorySlug>? slugs) => (super.noSuchMethod(
+ Invocation.method(
+ #getRepositories,
+ [slugs],
+ ),
+ returnValue: _i5.Stream<_i4.Repository>.empty(),
+ ) as _i5.Stream<_i4.Repository>);
+
+ @override
+ _i5.Future<_i4.Repository> editRepository(
+ _i4.RepositorySlug? slug, {
+ String? name,
+ String? description,
+ String? homepage,
+ bool? private,
+ bool? hasIssues,
+ bool? hasWiki,
+ bool? hasDownloads,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #editRepository,
+ [slug],
+ {
+ #name: name,
+ #description: description,
+ #homepage: homepage,
+ #private: private,
+ #hasIssues: hasIssues,
+ #hasWiki: hasWiki,
+ #hasDownloads: hasDownloads,
+ },
+ ),
+ returnValue: _i5.Future<_i4.Repository>.value(_FakeRepository_27(
+ this,
+ Invocation.method(
+ #editRepository,
+ [slug],
+ {
+ #name: name,
+ #description: description,
+ #homepage: homepage,
+ #private: private,
+ #hasIssues: hasIssues,
+ #hasWiki: hasWiki,
+ #hasDownloads: hasDownloads,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.Repository>);
+
+ @override
+ _i5.Future<bool> deleteRepository(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #deleteRepository,
+ [slug],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Stream<_i4.Contributor> listContributors(
+ _i4.RepositorySlug? slug, {
+ bool? anon = false,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listContributors,
+ [slug],
+ {#anon: anon},
+ ),
+ returnValue: _i5.Stream<_i4.Contributor>.empty(),
+ ) as _i5.Stream<_i4.Contributor>);
+
+ @override
+ _i5.Stream<_i4.Team> listTeams(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listTeams,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.Team>.empty(),
+ ) as _i5.Stream<_i4.Team>);
+
+ @override
+ _i5.Future<_i4.LanguageBreakdown> listLanguages(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listLanguages,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.LanguageBreakdown>.value(_FakeLanguageBreakdown_29(
+ this,
+ Invocation.method(
+ #listLanguages,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.LanguageBreakdown>);
+
+ @override
+ _i5.Stream<_i4.Tag> listTags(
+ _i4.RepositorySlug? slug, {
+ int? page = 1,
+ int? pages,
+ int? perPage = 30,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listTags,
+ [slug],
+ {
+ #page: page,
+ #pages: pages,
+ #perPage: perPage,
+ },
+ ),
+ returnValue: _i5.Stream<_i4.Tag>.empty(),
+ ) as _i5.Stream<_i4.Tag>);
+
+ @override
+ _i5.Stream<_i4.Branch> listBranches(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listBranches,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.Branch>.empty(),
+ ) as _i5.Stream<_i4.Branch>);
+
+ @override
+ _i5.Future<_i4.Branch> getBranch(
+ _i4.RepositorySlug? slug,
+ String? branch,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getBranch,
+ [
+ slug,
+ branch,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.Branch>.value(_FakeBranch_30(
+ this,
+ Invocation.method(
+ #getBranch,
+ [
+ slug,
+ branch,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.Branch>);
+
+ @override
+ _i5.Stream<_i4.Collaborator> listCollaborators(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listCollaborators,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.Collaborator>.empty(),
+ ) as _i5.Stream<_i4.Collaborator>);
+
+ @override
+ _i5.Future<bool> isCollaborator(
+ _i4.RepositorySlug? slug,
+ String? user,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #isCollaborator,
+ [
+ slug,
+ user,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> addCollaborator(
+ _i4.RepositorySlug? slug,
+ String? user,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #addCollaborator,
+ [
+ slug,
+ user,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> removeCollaborator(
+ _i4.RepositorySlug? slug,
+ String? user,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #removeCollaborator,
+ [
+ slug,
+ user,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Stream<_i4.CommitComment> listSingleCommitComments(
+ _i4.RepositorySlug? slug,
+ _i4.RepositoryCommit? commit,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listSingleCommitComments,
+ [
+ slug,
+ commit,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.CommitComment>.empty(),
+ ) as _i5.Stream<_i4.CommitComment>);
+
+ @override
+ _i5.Stream<_i4.CommitComment> listCommitComments(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listCommitComments,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.CommitComment>.empty(),
+ ) as _i5.Stream<_i4.CommitComment>);
+
+ @override
+ _i5.Future<_i4.CommitComment> createCommitComment(
+ _i4.RepositorySlug? slug,
+ _i4.RepositoryCommit? commit, {
+ required String? body,
+ String? path,
+ int? position,
+ int? line,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createCommitComment,
+ [
+ slug,
+ commit,
+ ],
+ {
+ #body: body,
+ #path: path,
+ #position: position,
+ #line: line,
+ },
+ ),
+ returnValue: _i5.Future<_i4.CommitComment>.value(_FakeCommitComment_31(
+ this,
+ Invocation.method(
+ #createCommitComment,
+ [
+ slug,
+ commit,
+ ],
+ {
+ #body: body,
+ #path: path,
+ #position: position,
+ #line: line,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.CommitComment>);
+
+ @override
+ _i5.Future<_i4.CommitComment> getCommitComment(
+ _i4.RepositorySlug? slug, {
+ required int? id,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getCommitComment,
+ [slug],
+ {#id: id},
+ ),
+ returnValue: _i5.Future<_i4.CommitComment>.value(_FakeCommitComment_31(
+ this,
+ Invocation.method(
+ #getCommitComment,
+ [slug],
+ {#id: id},
+ ),
+ )),
+ ) as _i5.Future<_i4.CommitComment>);
+
+ @override
+ _i5.Future<_i4.CommitComment> updateCommitComment(
+ _i4.RepositorySlug? slug, {
+ required int? id,
+ required String? body,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #updateCommitComment,
+ [slug],
+ {
+ #id: id,
+ #body: body,
+ },
+ ),
+ returnValue: _i5.Future<_i4.CommitComment>.value(_FakeCommitComment_31(
+ this,
+ Invocation.method(
+ #updateCommitComment,
+ [slug],
+ {
+ #id: id,
+ #body: body,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.CommitComment>);
+
+ @override
+ _i5.Future<bool> deleteCommitComment(
+ _i4.RepositorySlug? slug, {
+ required int? id,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deleteCommitComment,
+ [slug],
+ {#id: id},
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Stream<_i4.RepositoryCommit> listCommits(
+ _i4.RepositorySlug? slug, {
+ String? sha,
+ String? path,
+ String? author,
+ String? committer,
+ DateTime? since,
+ DateTime? until,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listCommits,
+ [slug],
+ {
+ #sha: sha,
+ #path: path,
+ #author: author,
+ #committer: committer,
+ #since: since,
+ #until: until,
+ },
+ ),
+ returnValue: _i5.Stream<_i4.RepositoryCommit>.empty(),
+ ) as _i5.Stream<_i4.RepositoryCommit>);
+
+ @override
+ _i5.Future<_i4.RepositoryCommit> getCommit(
+ _i4.RepositorySlug? slug,
+ String? sha,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getCommit,
+ [
+ slug,
+ sha,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.RepositoryCommit>.value(_FakeRepositoryCommit_32(
+ this,
+ Invocation.method(
+ #getCommit,
+ [
+ slug,
+ sha,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.RepositoryCommit>);
+
+ @override
+ _i5.Future<String> getCommitDiff(
+ _i4.RepositorySlug? slug,
+ String? sha,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getCommitDiff,
+ [
+ slug,
+ sha,
+ ],
+ ),
+ returnValue: _i5.Future<String>.value(_i8.dummyValue<String>(
+ this,
+ Invocation.method(
+ #getCommitDiff,
+ [
+ slug,
+ sha,
+ ],
+ ),
+ )),
+ ) as _i5.Future<String>);
+
+ @override
+ _i5.Future<_i4.GitHubComparison> compareCommits(
+ _i4.RepositorySlug? slug,
+ String? refBase,
+ String? refHead,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #compareCommits,
+ [
+ slug,
+ refBase,
+ refHead,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.GitHubComparison>.value(_FakeGitHubComparison_33(
+ this,
+ Invocation.method(
+ #compareCommits,
+ [
+ slug,
+ refBase,
+ refHead,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.GitHubComparison>);
+
+ @override
+ _i5.Future<_i4.GitHubFile> getReadme(
+ _i4.RepositorySlug? slug, {
+ String? ref,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getReadme,
+ [slug],
+ {#ref: ref},
+ ),
+ returnValue: _i5.Future<_i4.GitHubFile>.value(_FakeGitHubFile_34(
+ this,
+ Invocation.method(
+ #getReadme,
+ [slug],
+ {#ref: ref},
+ ),
+ )),
+ ) as _i5.Future<_i4.GitHubFile>);
+
+ @override
+ _i5.Future<_i4.RepositoryContents> getContents(
+ _i4.RepositorySlug? slug,
+ String? path, {
+ String? ref,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getContents,
+ [
+ slug,
+ path,
+ ],
+ {#ref: ref},
+ ),
+ returnValue: _i5.Future<_i4.RepositoryContents>.value(_FakeRepositoryContents_35(
+ this,
+ Invocation.method(
+ #getContents,
+ [
+ slug,
+ path,
+ ],
+ {#ref: ref},
+ ),
+ )),
+ ) as _i5.Future<_i4.RepositoryContents>);
+
+ @override
+ _i5.Future<_i4.ContentCreation> createFile(
+ _i4.RepositorySlug? slug,
+ _i4.CreateFile? file,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createFile,
+ [
+ slug,
+ file,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.ContentCreation>.value(_FakeContentCreation_36(
+ this,
+ Invocation.method(
+ #createFile,
+ [
+ slug,
+ file,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.ContentCreation>);
+
+ @override
+ _i5.Future<_i4.ContentCreation> updateFile(
+ _i4.RepositorySlug? slug,
+ String? path,
+ String? message,
+ String? content,
+ String? sha, {
+ String? branch,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #updateFile,
+ [
+ slug,
+ path,
+ message,
+ content,
+ sha,
+ ],
+ {#branch: branch},
+ ),
+ returnValue: _i5.Future<_i4.ContentCreation>.value(_FakeContentCreation_36(
+ this,
+ Invocation.method(
+ #updateFile,
+ [
+ slug,
+ path,
+ message,
+ content,
+ sha,
+ ],
+ {#branch: branch},
+ ),
+ )),
+ ) as _i5.Future<_i4.ContentCreation>);
+
+ @override
+ _i5.Future<_i4.ContentCreation> deleteFile(
+ _i4.RepositorySlug? slug,
+ String? path,
+ String? message,
+ String? sha,
+ String? branch,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deleteFile,
+ [
+ slug,
+ path,
+ message,
+ sha,
+ branch,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.ContentCreation>.value(_FakeContentCreation_36(
+ this,
+ Invocation.method(
+ #deleteFile,
+ [
+ slug,
+ path,
+ message,
+ sha,
+ branch,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.ContentCreation>);
+
+ @override
+ _i5.Future<String?> getArchiveLink(
+ _i4.RepositorySlug? slug,
+ String? ref, {
+ String? format = r'tarball',
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getArchiveLink,
+ [
+ slug,
+ ref,
+ ],
+ {#format: format},
+ ),
+ returnValue: _i5.Future<String?>.value(),
+ ) as _i5.Future<String?>);
+
+ @override
+ _i5.Stream<_i4.Repository> listForks(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listForks,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.Repository>.empty(),
+ ) as _i5.Stream<_i4.Repository>);
+
+ @override
+ _i5.Future<_i4.Repository> createFork(
+ _i4.RepositorySlug? slug, [
+ _i4.CreateFork? fork,
+ ]) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createFork,
+ [
+ slug,
+ fork,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.Repository>.value(_FakeRepository_27(
+ this,
+ Invocation.method(
+ #createFork,
+ [
+ slug,
+ fork,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.Repository>);
+
+ @override
+ _i5.Stream<_i4.Hook> listHooks(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listHooks,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.Hook>.empty(),
+ ) as _i5.Stream<_i4.Hook>);
+
+ @override
+ _i5.Future<_i4.Hook> getHook(
+ _i4.RepositorySlug? slug,
+ int? id,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getHook,
+ [
+ slug,
+ id,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.Hook>.value(_FakeHook_37(
+ this,
+ Invocation.method(
+ #getHook,
+ [
+ slug,
+ id,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.Hook>);
+
+ @override
+ _i5.Future<_i4.Hook> createHook(
+ _i4.RepositorySlug? slug,
+ _i4.CreateHook? hook,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createHook,
+ [
+ slug,
+ hook,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.Hook>.value(_FakeHook_37(
+ this,
+ Invocation.method(
+ #createHook,
+ [
+ slug,
+ hook,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.Hook>);
+
+ @override
+ _i5.Future<_i4.Hook> editHook(
+ _i4.RepositorySlug? slug,
+ _i4.Hook? hookToEdit, {
+ String? configUrl,
+ String? configContentType,
+ String? configSecret,
+ bool? configInsecureSsl,
+ List<String>? events,
+ List<String>? addEvents,
+ List<String>? removeEvents,
+ bool? active,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #editHook,
+ [
+ slug,
+ hookToEdit,
+ ],
+ {
+ #configUrl: configUrl,
+ #configContentType: configContentType,
+ #configSecret: configSecret,
+ #configInsecureSsl: configInsecureSsl,
+ #events: events,
+ #addEvents: addEvents,
+ #removeEvents: removeEvents,
+ #active: active,
+ },
+ ),
+ returnValue: _i5.Future<_i4.Hook>.value(_FakeHook_37(
+ this,
+ Invocation.method(
+ #editHook,
+ [
+ slug,
+ hookToEdit,
+ ],
+ {
+ #configUrl: configUrl,
+ #configContentType: configContentType,
+ #configSecret: configSecret,
+ #configInsecureSsl: configInsecureSsl,
+ #events: events,
+ #addEvents: addEvents,
+ #removeEvents: removeEvents,
+ #active: active,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.Hook>);
+
+ @override
+ _i5.Future<bool> testPushHook(
+ _i4.RepositorySlug? slug,
+ int? id,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #testPushHook,
+ [
+ slug,
+ id,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> pingHook(
+ _i4.RepositorySlug? slug,
+ int? id,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #pingHook,
+ [
+ slug,
+ id,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> deleteHook(
+ _i4.RepositorySlug? slug,
+ int? id,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deleteHook,
+ [
+ slug,
+ id,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Stream<_i4.PublicKey> listDeployKeys(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listDeployKeys,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.PublicKey>.empty(),
+ ) as _i5.Stream<_i4.PublicKey>);
+
+ @override
+ _i5.Future<_i4.PublicKey> getDeployKey(
+ _i4.RepositorySlug? slug, {
+ required int? id,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getDeployKey,
+ [slug],
+ {#id: id},
+ ),
+ returnValue: _i5.Future<_i4.PublicKey>.value(_FakePublicKey_38(
+ this,
+ Invocation.method(
+ #getDeployKey,
+ [slug],
+ {#id: id},
+ ),
+ )),
+ ) as _i5.Future<_i4.PublicKey>);
+
+ @override
+ _i5.Future<_i4.PublicKey> createDeployKey(
+ _i4.RepositorySlug? slug,
+ _i4.CreatePublicKey? key,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createDeployKey,
+ [
+ slug,
+ key,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.PublicKey>.value(_FakePublicKey_38(
+ this,
+ Invocation.method(
+ #createDeployKey,
+ [
+ slug,
+ key,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.PublicKey>);
+
+ @override
+ _i5.Future<bool> deleteDeployKey({
+ required _i4.RepositorySlug? slug,
+ required _i4.PublicKey? key,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deleteDeployKey,
+ [],
+ {
+ #slug: slug,
+ #key: key,
+ },
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<_i4.RepositoryCommit> merge(
+ _i4.RepositorySlug? slug,
+ _i4.CreateMerge? merge,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #merge,
+ [
+ slug,
+ merge,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.RepositoryCommit>.value(_FakeRepositoryCommit_32(
+ this,
+ Invocation.method(
+ #merge,
+ [
+ slug,
+ merge,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.RepositoryCommit>);
+
+ @override
+ _i5.Future<_i4.RepositoryPages> getPagesInfo(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #getPagesInfo,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.RepositoryPages>.value(_FakeRepositoryPages_39(
+ this,
+ Invocation.method(
+ #getPagesInfo,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.RepositoryPages>);
+
+ @override
+ _i5.Stream<_i4.PageBuild> listPagesBuilds(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listPagesBuilds,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.PageBuild>.empty(),
+ ) as _i5.Stream<_i4.PageBuild>);
+
+ @override
+ _i5.Future<_i4.PageBuild> getLatestPagesBuild(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #getLatestPagesBuild,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.PageBuild>.value(_FakePageBuild_40(
+ this,
+ Invocation.method(
+ #getLatestPagesBuild,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.PageBuild>);
+
+ @override
+ _i5.Stream<_i4.Release> listReleases(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listReleases,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.Release>.empty(),
+ ) as _i5.Stream<_i4.Release>);
+
+ @override
+ _i5.Future<_i4.Release> getLatestRelease(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #getLatestRelease,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.Release>.value(_FakeRelease_41(
+ this,
+ Invocation.method(
+ #getLatestRelease,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.Release>);
+
+ @override
+ _i5.Future<_i4.Release> getReleaseById(
+ _i4.RepositorySlug? slug,
+ int? id,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getReleaseById,
+ [
+ slug,
+ id,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.Release>.value(_FakeRelease_41(
+ this,
+ Invocation.method(
+ #getReleaseById,
+ [
+ slug,
+ id,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.Release>);
+
+ @override
+ _i5.Future<_i4.Release> getReleaseByTagName(
+ _i4.RepositorySlug? slug,
+ String? tagName,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getReleaseByTagName,
+ [
+ slug,
+ tagName,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.Release>.value(_FakeRelease_41(
+ this,
+ Invocation.method(
+ #getReleaseByTagName,
+ [
+ slug,
+ tagName,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.Release>);
+
+ @override
+ _i5.Future<_i4.Release> createRelease(
+ _i4.RepositorySlug? slug,
+ _i4.CreateRelease? createRelease, {
+ bool? getIfExists = true,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createRelease,
+ [
+ slug,
+ createRelease,
+ ],
+ {#getIfExists: getIfExists},
+ ),
+ returnValue: _i5.Future<_i4.Release>.value(_FakeRelease_41(
+ this,
+ Invocation.method(
+ #createRelease,
+ [
+ slug,
+ createRelease,
+ ],
+ {#getIfExists: getIfExists},
+ ),
+ )),
+ ) as _i5.Future<_i4.Release>);
+
+ @override
+ _i5.Future<_i4.Release> editRelease(
+ _i4.RepositorySlug? slug,
+ _i4.Release? releaseToEdit, {
+ String? tagName,
+ String? targetCommitish,
+ String? name,
+ String? body,
+ bool? draft,
+ bool? preRelease,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #editRelease,
+ [
+ slug,
+ releaseToEdit,
+ ],
+ {
+ #tagName: tagName,
+ #targetCommitish: targetCommitish,
+ #name: name,
+ #body: body,
+ #draft: draft,
+ #preRelease: preRelease,
+ },
+ ),
+ returnValue: _i5.Future<_i4.Release>.value(_FakeRelease_41(
+ this,
+ Invocation.method(
+ #editRelease,
+ [
+ slug,
+ releaseToEdit,
+ ],
+ {
+ #tagName: tagName,
+ #targetCommitish: targetCommitish,
+ #name: name,
+ #body: body,
+ #draft: draft,
+ #preRelease: preRelease,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.Release>);
+
+ @override
+ _i5.Future<bool> deleteRelease(
+ _i4.RepositorySlug? slug,
+ _i4.Release? release,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deleteRelease,
+ [
+ slug,
+ release,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Stream<_i4.ReleaseAsset> listReleaseAssets(
+ _i4.RepositorySlug? slug,
+ _i4.Release? release,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listReleaseAssets,
+ [
+ slug,
+ release,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.ReleaseAsset>.empty(),
+ ) as _i5.Stream<_i4.ReleaseAsset>);
+
+ @override
+ _i5.Future<_i4.ReleaseAsset> getReleaseAsset(
+ _i4.RepositorySlug? slug,
+ _i4.Release? release, {
+ required int? assetId,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getReleaseAsset,
+ [
+ slug,
+ release,
+ ],
+ {#assetId: assetId},
+ ),
+ returnValue: _i5.Future<_i4.ReleaseAsset>.value(_FakeReleaseAsset_42(
+ this,
+ Invocation.method(
+ #getReleaseAsset,
+ [
+ slug,
+ release,
+ ],
+ {#assetId: assetId},
+ ),
+ )),
+ ) as _i5.Future<_i4.ReleaseAsset>);
+
+ @override
+ _i5.Future<_i4.ReleaseAsset> editReleaseAsset(
+ _i4.RepositorySlug? slug,
+ _i4.ReleaseAsset? assetToEdit, {
+ String? name,
+ String? label,
+ }) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #editReleaseAsset,
+ [
+ slug,
+ assetToEdit,
+ ],
+ {
+ #name: name,
+ #label: label,
+ },
+ ),
+ returnValue: _i5.Future<_i4.ReleaseAsset>.value(_FakeReleaseAsset_42(
+ this,
+ Invocation.method(
+ #editReleaseAsset,
+ [
+ slug,
+ assetToEdit,
+ ],
+ {
+ #name: name,
+ #label: label,
+ },
+ ),
+ )),
+ ) as _i5.Future<_i4.ReleaseAsset>);
+
+ @override
+ _i5.Future<bool> deleteReleaseAsset(
+ _i4.RepositorySlug? slug,
+ _i4.ReleaseAsset? asset,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deleteReleaseAsset,
+ [
+ slug,
+ asset,
+ ],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<List<_i4.ReleaseAsset>> uploadReleaseAssets(
+ _i4.Release? release,
+ Iterable<_i4.CreateReleaseAsset>? createReleaseAssets,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #uploadReleaseAssets,
+ [
+ release,
+ createReleaseAssets,
+ ],
+ ),
+ returnValue: _i5.Future<List<_i4.ReleaseAsset>>.value(<_i4.ReleaseAsset>[]),
+ ) as _i5.Future<List<_i4.ReleaseAsset>>);
+
+ @override
+ _i5.Future<List<_i4.ContributorStatistics>> listContributorStats(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listContributorStats,
+ [slug],
+ ),
+ returnValue: _i5.Future<List<_i4.ContributorStatistics>>.value(<_i4.ContributorStatistics>[]),
+ ) as _i5.Future<List<_i4.ContributorStatistics>>);
+
+ @override
+ _i5.Stream<_i4.YearCommitCountWeek> listCommitActivity(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listCommitActivity,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.YearCommitCountWeek>.empty(),
+ ) as _i5.Stream<_i4.YearCommitCountWeek>);
+
+ @override
+ _i5.Stream<_i4.WeeklyChangesCount> listCodeFrequency(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listCodeFrequency,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.WeeklyChangesCount>.empty(),
+ ) as _i5.Stream<_i4.WeeklyChangesCount>);
+
+ @override
+ _i5.Future<_i4.ContributorParticipation> getParticipation(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #getParticipation,
+ [slug],
+ ),
+ returnValue: _i5.Future<_i4.ContributorParticipation>.value(_FakeContributorParticipation_43(
+ this,
+ Invocation.method(
+ #getParticipation,
+ [slug],
+ ),
+ )),
+ ) as _i5.Future<_i4.ContributorParticipation>);
+
+ @override
+ _i5.Stream<_i4.PunchcardEntry> listPunchcard(_i4.RepositorySlug? slug) => (super.noSuchMethod(
+ Invocation.method(
+ #listPunchcard,
+ [slug],
+ ),
+ returnValue: _i5.Stream<_i4.PunchcardEntry>.empty(),
+ ) as _i5.Stream<_i4.PunchcardEntry>);
+
+ @override
+ _i5.Stream<_i4.RepositoryStatus> listStatuses(
+ _i4.RepositorySlug? slug,
+ String? ref,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #listStatuses,
+ [
+ slug,
+ ref,
+ ],
+ ),
+ returnValue: _i5.Stream<_i4.RepositoryStatus>.empty(),
+ ) as _i5.Stream<_i4.RepositoryStatus>);
+
+ @override
+ _i5.Future<_i4.RepositoryStatus> createStatus(
+ _i4.RepositorySlug? slug,
+ String? ref,
+ _i4.CreateStatus? request,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #createStatus,
+ [
+ slug,
+ ref,
+ request,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.RepositoryStatus>.value(_FakeRepositoryStatus_44(
+ this,
+ Invocation.method(
+ #createStatus,
+ [
+ slug,
+ ref,
+ request,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.RepositoryStatus>);
+
+ @override
+ _i5.Future<_i4.CombinedRepositoryStatus> getCombinedStatus(
+ _i4.RepositorySlug? slug,
+ String? ref,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getCombinedStatus,
+ [
+ slug,
+ ref,
+ ],
+ ),
+ returnValue: _i5.Future<_i4.CombinedRepositoryStatus>.value(_FakeCombinedRepositoryStatus_45(
+ this,
+ Invocation.method(
+ #getCombinedStatus,
+ [
+ slug,
+ ref,
+ ],
+ ),
+ )),
+ ) as _i5.Future<_i4.CombinedRepositoryStatus>);
+
+ @override
+ _i5.Future<_i4.ReleaseNotes> generateReleaseNotes(_i4.CreateReleaseNotes? crn) => (super.noSuchMethod(
+ Invocation.method(
+ #generateReleaseNotes,
+ [crn],
+ ),
+ returnValue: _i5.Future<_i4.ReleaseNotes>.value(_FakeReleaseNotes_46(
+ this,
+ Invocation.method(
+ #generateReleaseNotes,
+ [crn],
+ ),
+ )),
+ ) as _i5.Future<_i4.ReleaseNotes>);
+}
+
+/// A class which mocks [GitHubComparison].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockGitHubComparison extends _i1.Mock implements _i4.GitHubComparison {
+ MockGitHubComparison() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ set url(String? _url) => super.noSuchMethod(
+ Invocation.setter(
+ #url,
+ _url,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ set status(String? _status) => super.noSuchMethod(
+ Invocation.setter(
+ #status,
+ _status,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ set aheadBy(int? _aheadBy) => super.noSuchMethod(
+ Invocation.setter(
+ #aheadBy,
+ _aheadBy,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ set behindBy(int? _behindBy) => super.noSuchMethod(
+ Invocation.setter(
+ #behindBy,
+ _behindBy,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ set totalCommits(int? _totalCommits) => super.noSuchMethod(
+ Invocation.setter(
+ #totalCommits,
+ _totalCommits,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ set files(List<_i4.CommitFile>? _files) => super.noSuchMethod(
+ Invocation.setter(
+ #files,
+ _files,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ set commits(List<_i4.RepositoryCommit>? _commits) => super.noSuchMethod(
+ Invocation.setter(
+ #commits,
+ _commits,
+ ),
+ returnValueForMissingStub: null,
+ );
+
+ @override
+ Map<String, dynamic> toJson() => (super.noSuchMethod(
+ Invocation.method(
+ #toJson,
+ [],
+ ),
+ returnValue: <String, dynamic>{},
+ ) as Map<String, dynamic>);
+}
+
+/// A class which mocks [Response].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockResponse extends _i1.Mock implements _i2.Response {
+ MockResponse() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i9.Uint8List get bodyBytes => (super.noSuchMethod(
+ Invocation.getter(#bodyBytes),
+ returnValue: _i9.Uint8List(0),
+ ) as _i9.Uint8List);
+
+ @override
+ String get body => (super.noSuchMethod(
+ Invocation.getter(#body),
+ returnValue: _i8.dummyValue<String>(
+ this,
+ Invocation.getter(#body),
+ ),
+ ) as String);
+
+ @override
+ int get statusCode => (super.noSuchMethod(
+ Invocation.getter(#statusCode),
+ returnValue: 0,
+ ) as int);
+
+ @override
+ Map<String, String> get headers => (super.noSuchMethod(
+ Invocation.getter(#headers),
+ returnValue: <String, String>{},
+ ) as Map<String, String>);
+
+ @override
+ bool get isRedirect => (super.noSuchMethod(
+ Invocation.getter(#isRedirect),
+ returnValue: false,
+ ) as bool);
+
+ @override
+ bool get persistentConnection => (super.noSuchMethod(
+ Invocation.getter(#persistentConnection),
+ returnValue: false,
+ ) as bool);
+}
diff --git a/cocoon_server/pubspec.yaml b/cocoon_server/pubspec.yaml
new file mode 100644
index 0000000..2300a38
--- /dev/null
+++ b/cocoon_server/pubspec.yaml
@@ -0,0 +1,32 @@
+name: cocoon_server
+description: server-side functionality shared between `app_dart` and `auto_submit`.
+publish_to: none
+
+environment:
+ sdk: ^3.1.0
+
+# Version constraints in this package are intentionally relaxed, because the
+# exact versions are locked by app_dart and auto_submit apps.
+dependencies:
+ logging: ^1.2.0
+ meta: ^1.16.0
+ retry: ^3.1.2
+ googleapis: ^13.2.0
+ googleapis_auth: ^1.6.0
+ graphql: ^5.2.0-beta.9
+ gql: ^1.0.1-alpha+1709845491443
+ http: ^1.2.2
+ github: ^9.24.0
+ json_annotation: ^4.8.1
+ mockito: ^5.4.4
+
+dev_dependencies:
+ build_runner: ^2.4.13
+ fake_async: ^1.3.2
+ test: ^1.25.8
+ analyzer: ^6.0.0
+ json_serializable: ^6.7.1
+ flutter_lints: ^3.0.2
+
+builders:
+ json_serializable: ^3.3.0
diff --git a/cocoon_server/test/bigquery_test.dart b/cocoon_server/test/bigquery_test.dart
new file mode 100644
index 0000000..9478d00
--- /dev/null
+++ b/cocoon_server/test/bigquery_test.dart
@@ -0,0 +1,116 @@
+// Copyright 2022 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import 'dart:convert';
+
+import 'package:googleapis/bigquery/v2.dart';
+import 'package:mockito/mockito.dart';
+import 'package:cocoon_server/bigquery.dart';
+import 'package:cocoon_server/testing/bigquery_testing.dart';
+import 'package:cocoon_server/testing/mocks.dart';
+import 'package:cocoon_server/big_query_pull_request_record.dart';
+import 'package:test/expect.dart';
+import 'package:test/scaffolding.dart';
+
+void main() {
+ late FakeBigqueryService service;
+ late MockJobsResource jobsResource;
+
+ setUp(() {
+ jobsResource = MockJobsResource();
+ service = FakeBigqueryService(jobsResource);
+ });
+
+ test('Insert pull request record is successful.', () async {
+ when(jobsResource.query(captureAny, expectedProjectId)).thenAnswer((Invocation invocation) {
+ return Future<QueryResponse>.value(
+ QueryResponse.fromJson(jsonDecode(insertDeleteUpdateSuccessResponse) as Map<dynamic, dynamic>),
+ );
+ });
+
+ final PullRequestRecord pullRequestRecord = PullRequestRecord(
+ prCreatedTimestamp: DateTime.fromMillisecondsSinceEpoch(123456789),
+ prLandedTimestamp: DateTime.fromMillisecondsSinceEpoch(234567890),
+ organization: 'flutter',
+ repository: 'cocoon',
+ author: 'ricardoamador',
+ prNumber: 345,
+ prCommit: 'ade456',
+ prRequestType: 'merge',
+ );
+
+ bool hasError = false;
+ try {
+ await service.insertPullRequestRecord(
+ projectId: expectedProjectId,
+ pullRequestRecord: pullRequestRecord,
+ );
+ } on BigQueryException {
+ hasError = true;
+ }
+ expect(hasError, isFalse);
+ });
+
+ test('Insert pull request record handles unsuccessful job complete error.', () async {
+ when(jobsResource.query(captureAny, expectedProjectId)).thenAnswer((Invocation invocation) {
+ return Future<QueryResponse>.value(
+ QueryResponse.fromJson(jsonDecode(errorResponse) as Map<dynamic, dynamic>),
+ );
+ });
+
+ bool hasError = false;
+ final PullRequestRecord pullRequestRecord = PullRequestRecord(
+ prCreatedTimestamp: DateTime.fromMillisecondsSinceEpoch(123456789),
+ prLandedTimestamp: DateTime.fromMillisecondsSinceEpoch(234567890),
+ organization: 'flutter',
+ repository: 'cocoon',
+ author: 'ricardoamador',
+ prNumber: 345,
+ prCommit: 'ade456',
+ prRequestType: 'merge',
+ );
+
+ try {
+ await service.insertPullRequestRecord(
+ projectId: expectedProjectId,
+ pullRequestRecord: pullRequestRecord,
+ );
+ } on BigQueryException catch (exception) {
+ expect(exception.cause, 'Insert pull request $pullRequestRecord did not complete.');
+ hasError = true;
+ }
+ expect(hasError, isTrue);
+ });
+
+ test('Insert pull request fails when multiple rows are returned.', () async {
+ when(jobsResource.query(captureAny, expectedProjectId)).thenAnswer((Invocation invocation) {
+ return Future<QueryResponse>.value(
+ QueryResponse.fromJson(jsonDecode(selectPullRequestTooManyRowsResponse) as Map<dynamic, dynamic>),
+ );
+ });
+
+ bool hasError = false;
+ final PullRequestRecord pullRequestRecord = PullRequestRecord(
+ prCreatedTimestamp: DateTime.fromMillisecondsSinceEpoch(123456789),
+ prLandedTimestamp: DateTime.fromMillisecondsSinceEpoch(234567890),
+ organization: 'flutter',
+ repository: 'cocoon',
+ author: 'ricardoamador',
+ prNumber: 345,
+ prCommit: 'ade456',
+ prRequestType: 'merge',
+ );
+
+ try {
+ await service.insertPullRequestRecord(
+ projectId: expectedProjectId,
+ pullRequestRecord: pullRequestRecord,
+ );
+ } on BigQueryException catch (exception) {
+ expect(exception.cause, 'There was an error inserting $pullRequestRecord into the table.');
+ hasError = true;
+ }
+ expect(hasError, isTrue);
+ });
+}
diff --git a/tests.yaml b/tests.yaml
index ff6a062..ef604bc 100644
--- a/tests.yaml
+++ b/tests.yaml
@@ -26,6 +26,9 @@
- task: cipd_packages/codesign
script: test_utilities/bin/dart_test_runner.sh
+ - task: cocoon_server
+ script: test_utilities/bin/dart_test_runner.sh
+
- task: app_dart
script: test_utilities/bin/dart_test_runner.sh