OLD | NEW |
1 library googleapis_beta.replicapoolupdater.v1beta1.test; | 1 library googleapis_beta.replicapoolupdater.v1beta1.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:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 checkInstanceUpdate(api.InstanceUpdate o) { | 50 checkInstanceUpdate(api.InstanceUpdate o) { |
51 buildCounterInstanceUpdate++; | 51 buildCounterInstanceUpdate++; |
52 if (buildCounterInstanceUpdate < 3) { | 52 if (buildCounterInstanceUpdate < 3) { |
53 unittest.expect(o.instanceName, unittest.equals('foo')); | 53 unittest.expect(o.instanceName, unittest.equals('foo')); |
54 unittest.expect(o.state, unittest.equals('foo')); | 54 unittest.expect(o.state, unittest.equals('foo')); |
55 } | 55 } |
56 buildCounterInstanceUpdate--; | 56 buildCounterInstanceUpdate--; |
57 } | 57 } |
58 | 58 |
59 buildUnnamed1375() { | 59 buildUnnamed1278() { |
60 var o = new core.List<api.InstanceUpdate>(); | 60 var o = new core.List<api.InstanceUpdate>(); |
61 o.add(buildInstanceUpdate()); | 61 o.add(buildInstanceUpdate()); |
62 o.add(buildInstanceUpdate()); | 62 o.add(buildInstanceUpdate()); |
63 return o; | 63 return o; |
64 } | 64 } |
65 | 65 |
66 checkUnnamed1375(core.List<api.InstanceUpdate> o) { | 66 checkUnnamed1278(core.List<api.InstanceUpdate> o) { |
67 unittest.expect(o, unittest.hasLength(2)); | 67 unittest.expect(o, unittest.hasLength(2)); |
68 checkInstanceUpdate(o[0]); | 68 checkInstanceUpdate(o[0]); |
69 checkInstanceUpdate(o[1]); | 69 checkInstanceUpdate(o[1]); |
70 } | 70 } |
71 | 71 |
72 core.int buildCounterUpdate = 0; | 72 core.int buildCounterUpdate = 0; |
73 buildUpdate() { | 73 buildUpdate() { |
74 var o = new api.Update(); | 74 var o = new api.Update(); |
75 buildCounterUpdate++; | 75 buildCounterUpdate++; |
76 if (buildCounterUpdate < 3) { | 76 if (buildCounterUpdate < 3) { |
77 o.details = "foo"; | 77 o.details = "foo"; |
78 o.handle = "foo"; | 78 o.handle = "foo"; |
79 o.instanceTemplate = "foo"; | 79 o.instanceTemplate = "foo"; |
80 o.instanceUpdates = buildUnnamed1375(); | 80 o.instanceUpdates = buildUnnamed1278(); |
81 o.kind = "foo"; | 81 o.kind = "foo"; |
82 o.policy = buildUpdatePolicy(); | 82 o.policy = buildUpdatePolicy(); |
83 o.selfLink = "foo"; | 83 o.selfLink = "foo"; |
84 o.state = "foo"; | 84 o.state = "foo"; |
85 o.targetState = "foo"; | 85 o.targetState = "foo"; |
86 } | 86 } |
87 buildCounterUpdate--; | 87 buildCounterUpdate--; |
88 return o; | 88 return o; |
89 } | 89 } |
90 | 90 |
91 checkUpdate(api.Update o) { | 91 checkUpdate(api.Update o) { |
92 buildCounterUpdate++; | 92 buildCounterUpdate++; |
93 if (buildCounterUpdate < 3) { | 93 if (buildCounterUpdate < 3) { |
94 unittest.expect(o.details, unittest.equals('foo')); | 94 unittest.expect(o.details, unittest.equals('foo')); |
95 unittest.expect(o.handle, unittest.equals('foo')); | 95 unittest.expect(o.handle, unittest.equals('foo')); |
96 unittest.expect(o.instanceTemplate, unittest.equals('foo')); | 96 unittest.expect(o.instanceTemplate, unittest.equals('foo')); |
97 checkUnnamed1375(o.instanceUpdates); | 97 checkUnnamed1278(o.instanceUpdates); |
98 unittest.expect(o.kind, unittest.equals('foo')); | 98 unittest.expect(o.kind, unittest.equals('foo')); |
99 checkUpdatePolicy(o.policy); | 99 checkUpdatePolicy(o.policy); |
100 unittest.expect(o.selfLink, unittest.equals('foo')); | 100 unittest.expect(o.selfLink, unittest.equals('foo')); |
101 unittest.expect(o.state, unittest.equals('foo')); | 101 unittest.expect(o.state, unittest.equals('foo')); |
102 unittest.expect(o.targetState, unittest.equals('foo')); | 102 unittest.expect(o.targetState, unittest.equals('foo')); |
103 } | 103 } |
104 buildCounterUpdate--; | 104 buildCounterUpdate--; |
105 } | 105 } |
106 | 106 |
107 buildUnnamed1376() { | 107 buildUnnamed1279() { |
108 var o = new core.List<api.Update>(); | 108 var o = new core.List<api.Update>(); |
109 o.add(buildUpdate()); | 109 o.add(buildUpdate()); |
110 o.add(buildUpdate()); | 110 o.add(buildUpdate()); |
111 return o; | 111 return o; |
112 } | 112 } |
113 | 113 |
114 checkUnnamed1376(core.List<api.Update> o) { | 114 checkUnnamed1279(core.List<api.Update> o) { |
115 unittest.expect(o, unittest.hasLength(2)); | 115 unittest.expect(o, unittest.hasLength(2)); |
116 checkUpdate(o[0]); | 116 checkUpdate(o[0]); |
117 checkUpdate(o[1]); | 117 checkUpdate(o[1]); |
118 } | 118 } |
119 | 119 |
120 core.int buildCounterUpdateList = 0; | 120 core.int buildCounterUpdateList = 0; |
121 buildUpdateList() { | 121 buildUpdateList() { |
122 var o = new api.UpdateList(); | 122 var o = new api.UpdateList(); |
123 buildCounterUpdateList++; | 123 buildCounterUpdateList++; |
124 if (buildCounterUpdateList < 3) { | 124 if (buildCounterUpdateList < 3) { |
125 o.items = buildUnnamed1376(); | 125 o.items = buildUnnamed1279(); |
126 o.nextPageToken = "foo"; | 126 o.nextPageToken = "foo"; |
127 } | 127 } |
128 buildCounterUpdateList--; | 128 buildCounterUpdateList--; |
129 return o; | 129 return o; |
130 } | 130 } |
131 | 131 |
132 checkUpdateList(api.UpdateList o) { | 132 checkUpdateList(api.UpdateList o) { |
133 buildCounterUpdateList++; | 133 buildCounterUpdateList++; |
134 if (buildCounterUpdateList < 3) { | 134 if (buildCounterUpdateList < 3) { |
135 checkUnnamed1376(o.items); | 135 checkUnnamed1279(o.items); |
136 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 136 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
137 } | 137 } |
138 buildCounterUpdateList--; | 138 buildCounterUpdateList--; |
139 } | 139 } |
140 | 140 |
141 core.int buildCounterUpdatePolicy = 0; | 141 core.int buildCounterUpdatePolicy = 0; |
142 buildUpdatePolicy() { | 142 buildUpdatePolicy() { |
143 var o = new api.UpdatePolicy(); | 143 var o = new api.UpdatePolicy(); |
144 buildCounterUpdatePolicy++; | 144 buildCounterUpdatePolicy++; |
145 if (buildCounterUpdatePolicy < 3) { | 145 if (buildCounterUpdatePolicy < 3) { |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 548 return new async.Future.value(common_test.stringResponse(200, h, resp)); |
549 }), true); | 549 }), true); |
550 res.rollforward(arg_project, arg_zone, arg_instanceGroupManager, arg_updat
e).then(unittest.expectAsync((_) {})); | 550 res.rollforward(arg_project, arg_zone, arg_instanceGroupManager, arg_updat
e).then(unittest.expectAsync((_) {})); |
551 }); | 551 }); |
552 | 552 |
553 }); | 553 }); |
554 | 554 |
555 | 555 |
556 } | 556 } |
557 | 557 |
OLD | NEW |