Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(953)

Unified Diff: generated/googleapis/test/groupsmigration/v1.dart

Issue 560323003: Add discovery service to stable APIs (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: New generator hash in pubspec.yaml, test files renamed ot have _test.dart postfix Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: generated/googleapis/test/groupsmigration/v1.dart
diff --git a/generated/googleapis/test/groupsmigration/v1.dart b/generated/googleapis/test/groupsmigration/v1.dart
deleted file mode 100644
index e8669c897051cb09406d54bde4dc8a7e73531e24..0000000000000000000000000000000000000000
--- a/generated/googleapis/test/groupsmigration/v1.dart
+++ /dev/null
@@ -1,107 +0,0 @@
-library googleapis.groupsmigration.v1.test;
-
-import "dart:core" as core;
-import "dart:collection" as collection;
-import "dart:async" as async;
-import "dart:convert" as convert;
-
-import 'package:http/http.dart' as http;
-import 'package:http/testing.dart' as http_testing;
-import 'package:unittest/unittest.dart' as unittest;
-import 'package:googleapis/common/common.dart' as common;
-import 'package:googleapis/src/common_internal.dart' as common_internal;
-import '../common/common_internal_test.dart' as common_test;
-
-import 'package:googleapis/groupsmigration/v1.dart' as api;
-
-
-
-core.int buildCounterGroups = 0;
-buildGroups() {
- var o = new api.Groups();
- buildCounterGroups++;
- if (buildCounterGroups < 3) {
- o.kind = "foo";
- o.responseCode = "foo";
- }
- buildCounterGroups--;
- return o;
-}
-
-checkGroups(api.Groups o) {
- buildCounterGroups++;
- if (buildCounterGroups < 3) {
- unittest.expect(o.kind, unittest.equals('foo'));
- unittest.expect(o.responseCode, unittest.equals('foo'));
- }
- buildCounterGroups--;
-}
-
-
-main() {
- unittest.group("obj-schema-Groups", () {
- unittest.test("to-json--from-json", () {
- var o = buildGroups();
- var od = new api.Groups.fromJson(o.toJson());
- checkGroups(od);
- });
- });
-
-
- unittest.group("resource-ArchiveResourceApi", () {
- unittest.test("method--insert", () {
- // TODO: Implement tests for media upload;
- // TODO: Implement tests for media download;
-
- var mock = new common_test.HttpServerMock();
- api.ArchiveResourceApi res = new api.GroupsmigrationApi(mock).archive;
- var arg_groupId = "foo";
- mock.register(unittest.expectAsync((http.BaseRequest req, json) {
- var path = (req.url).path;
- var pathOffset = 0;
- var index;
- var subPart;
- unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.equals("/groups/v1/groups/"));
- pathOffset += 18;
- index = path.indexOf("/archive", pathOffset);
- unittest.expect(index >= 0, unittest.isTrue);
- subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
- pathOffset = index;
- unittest.expect(subPart, unittest.equals("$arg_groupId"));
- unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equals("/archive"));
- pathOffset += 8;
-
- var query = (req.url).query;
- var queryOffset = 0;
- var queryMap = {};
- addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
- parseBool(n) {
- if (n == "true") return true;
- if (n == "false") return false;
- if (n == null) return null;
- throw new core.ArgumentError("Invalid boolean: $n");
- }
- if (query.length > 0) {
- for (var part in query.split("&")) {
- var keyvalue = part.split("=");
- addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1]));
- }
- }
-
-
- var h = {
- "content-type" : "application/json; charset=utf-8",
- };
- var resp = convert.JSON.encode(buildGroups());
- return new async.Future.value(common_test.stringResponse(200, h, resp));
- }), true);
- res.insert(arg_groupId).then(unittest.expectAsync(((api.Groups response) {
- checkGroups(response);
- })));
- });
-
- });
-
-
-}
-
« no previous file with comments | « generated/googleapis/test/gmail/v1_test.dart ('k') | generated/googleapis/test/groupsmigration/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698