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

Side by Side Diff: generated/googleapis/test/cloudfunctions/v1_test.dart

Issue 2973303002: Api-Roll 51: 2017-07-10 (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 library googleapis.cloudfunctions.v1.test; 1 library googleapis.cloudfunctions.v1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:test/test.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed99() { 54 buildUnnamed178() {
55 var o = new core.Map<core.String, core.Object>(); 55 var o = new core.Map<core.String, core.Object>();
56 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 56 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
57 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 57 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed99(core.Map<core.String, core.Object> o) { 61 checkUnnamed178(core.Map<core.String, core.Object> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo')); 63 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo'));
64 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo')); 64 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo'));
65 } 65 }
66 66
67 core.int buildCounterOperationMetadataV1Beta2 = 0; 67 core.int buildCounterOperationMetadataV1Beta2 = 0;
68 buildOperationMetadataV1Beta2() { 68 buildOperationMetadataV1Beta2() {
69 var o = new api.OperationMetadataV1Beta2(); 69 var o = new api.OperationMetadataV1Beta2();
70 buildCounterOperationMetadataV1Beta2++; 70 buildCounterOperationMetadataV1Beta2++;
71 if (buildCounterOperationMetadataV1Beta2 < 3) { 71 if (buildCounterOperationMetadataV1Beta2 < 3) {
72 o.request = buildUnnamed99(); 72 o.request = buildUnnamed178();
73 o.target = "foo"; 73 o.target = "foo";
74 o.type = "foo"; 74 o.type = "foo";
75 } 75 }
76 buildCounterOperationMetadataV1Beta2--; 76 buildCounterOperationMetadataV1Beta2--;
77 return o; 77 return o;
78 } 78 }
79 79
80 checkOperationMetadataV1Beta2(api.OperationMetadataV1Beta2 o) { 80 checkOperationMetadataV1Beta2(api.OperationMetadataV1Beta2 o) {
81 buildCounterOperationMetadataV1Beta2++; 81 buildCounterOperationMetadataV1Beta2++;
82 if (buildCounterOperationMetadataV1Beta2 < 3) { 82 if (buildCounterOperationMetadataV1Beta2 < 3) {
83 checkUnnamed99(o.request); 83 checkUnnamed178(o.request);
84 unittest.expect(o.target, unittest.equals('foo')); 84 unittest.expect(o.target, unittest.equals('foo'));
85 unittest.expect(o.type, unittest.equals('foo')); 85 unittest.expect(o.type, unittest.equals('foo'));
86 } 86 }
87 buildCounterOperationMetadataV1Beta2--; 87 buildCounterOperationMetadataV1Beta2--;
88 } 88 }
89 89
90 90
91 main() { 91 main() {
92 unittest.group("obj-schema-OperationMetadataV1Beta2", () { 92 unittest.group("obj-schema-OperationMetadataV1Beta2", () {
93 unittest.test("to-json--from-json", () { 93 unittest.test("to-json--from-json", () {
94 var o = buildOperationMetadataV1Beta2(); 94 var o = buildOperationMetadataV1Beta2();
95 var od = new api.OperationMetadataV1Beta2.fromJson(o.toJson()); 95 var od = new api.OperationMetadataV1Beta2.fromJson(o.toJson());
96 checkOperationMetadataV1Beta2(od); 96 checkOperationMetadataV1Beta2(od);
97 }); 97 });
98 }); 98 });
99 99
100 100
101 } 101 }
102 102
OLDNEW
« no previous file with comments | « generated/googleapis/test/clouddebugger/v2_test.dart ('k') | generated/googleapis/test/cloudkms/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698