| OLD | NEW |
| 1 library googleapis.script.v1.test; | 1 library googleapis.script.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 Loading... |
| 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 buildUnnamed781() { | 54 buildUnnamed799() { |
| 55 var o = new core.List<api.ScriptStackTraceElement>(); | 55 var o = new core.List<api.ScriptStackTraceElement>(); |
| 56 o.add(buildScriptStackTraceElement()); | 56 o.add(buildScriptStackTraceElement()); |
| 57 o.add(buildScriptStackTraceElement()); | 57 o.add(buildScriptStackTraceElement()); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed781(core.List<api.ScriptStackTraceElement> o) { | 61 checkUnnamed799(core.List<api.ScriptStackTraceElement> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkScriptStackTraceElement(o[0]); | 63 checkScriptStackTraceElement(o[0]); |
| 64 checkScriptStackTraceElement(o[1]); | 64 checkScriptStackTraceElement(o[1]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 core.int buildCounterExecutionError = 0; | 67 core.int buildCounterExecutionError = 0; |
| 68 buildExecutionError() { | 68 buildExecutionError() { |
| 69 var o = new api.ExecutionError(); | 69 var o = new api.ExecutionError(); |
| 70 buildCounterExecutionError++; | 70 buildCounterExecutionError++; |
| 71 if (buildCounterExecutionError < 3) { | 71 if (buildCounterExecutionError < 3) { |
| 72 o.errorMessage = "foo"; | 72 o.errorMessage = "foo"; |
| 73 o.errorType = "foo"; | 73 o.errorType = "foo"; |
| 74 o.scriptStackTraceElements = buildUnnamed781(); | 74 o.scriptStackTraceElements = buildUnnamed799(); |
| 75 } | 75 } |
| 76 buildCounterExecutionError--; | 76 buildCounterExecutionError--; |
| 77 return o; | 77 return o; |
| 78 } | 78 } |
| 79 | 79 |
| 80 checkExecutionError(api.ExecutionError o) { | 80 checkExecutionError(api.ExecutionError o) { |
| 81 buildCounterExecutionError++; | 81 buildCounterExecutionError++; |
| 82 if (buildCounterExecutionError < 3) { | 82 if (buildCounterExecutionError < 3) { |
| 83 unittest.expect(o.errorMessage, unittest.equals('foo')); | 83 unittest.expect(o.errorMessage, unittest.equals('foo')); |
| 84 unittest.expect(o.errorType, unittest.equals('foo')); | 84 unittest.expect(o.errorType, unittest.equals('foo')); |
| 85 checkUnnamed781(o.scriptStackTraceElements); | 85 checkUnnamed799(o.scriptStackTraceElements); |
| 86 } | 86 } |
| 87 buildCounterExecutionError--; | 87 buildCounterExecutionError--; |
| 88 } | 88 } |
| 89 | 89 |
| 90 buildUnnamed782() { | 90 buildUnnamed800() { |
| 91 var o = new core.List<core.Object>(); | 91 var o = new core.List<core.Object>(); |
| 92 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 92 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 93 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 93 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 94 return o; | 94 return o; |
| 95 } | 95 } |
| 96 | 96 |
| 97 checkUnnamed782(core.List<core.Object> o) { | 97 checkUnnamed800(core.List<core.Object> o) { |
| 98 unittest.expect(o, unittest.hasLength(2)); | 98 unittest.expect(o, unittest.hasLength(2)); |
| 99 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); | 99 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); |
| 100 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); | 100 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); |
| 101 } | 101 } |
| 102 | 102 |
| 103 core.int buildCounterExecutionRequest = 0; | 103 core.int buildCounterExecutionRequest = 0; |
| 104 buildExecutionRequest() { | 104 buildExecutionRequest() { |
| 105 var o = new api.ExecutionRequest(); | 105 var o = new api.ExecutionRequest(); |
| 106 buildCounterExecutionRequest++; | 106 buildCounterExecutionRequest++; |
| 107 if (buildCounterExecutionRequest < 3) { | 107 if (buildCounterExecutionRequest < 3) { |
| 108 o.devMode = true; | 108 o.devMode = true; |
| 109 o.function = "foo"; | 109 o.function = "foo"; |
| 110 o.parameters = buildUnnamed782(); | 110 o.parameters = buildUnnamed800(); |
| 111 o.sessionState = "foo"; | 111 o.sessionState = "foo"; |
| 112 } | 112 } |
| 113 buildCounterExecutionRequest--; | 113 buildCounterExecutionRequest--; |
| 114 return o; | 114 return o; |
| 115 } | 115 } |
| 116 | 116 |
| 117 checkExecutionRequest(api.ExecutionRequest o) { | 117 checkExecutionRequest(api.ExecutionRequest o) { |
| 118 buildCounterExecutionRequest++; | 118 buildCounterExecutionRequest++; |
| 119 if (buildCounterExecutionRequest < 3) { | 119 if (buildCounterExecutionRequest < 3) { |
| 120 unittest.expect(o.devMode, unittest.isTrue); | 120 unittest.expect(o.devMode, unittest.isTrue); |
| 121 unittest.expect(o.function, unittest.equals('foo')); | 121 unittest.expect(o.function, unittest.equals('foo')); |
| 122 checkUnnamed782(o.parameters); | 122 checkUnnamed800(o.parameters); |
| 123 unittest.expect(o.sessionState, unittest.equals('foo')); | 123 unittest.expect(o.sessionState, unittest.equals('foo')); |
| 124 } | 124 } |
| 125 buildCounterExecutionRequest--; | 125 buildCounterExecutionRequest--; |
| 126 } | 126 } |
| 127 | 127 |
| 128 core.int buildCounterExecutionResponse = 0; | 128 core.int buildCounterExecutionResponse = 0; |
| 129 buildExecutionResponse() { | 129 buildExecutionResponse() { |
| 130 var o = new api.ExecutionResponse(); | 130 var o = new api.ExecutionResponse(); |
| 131 buildCounterExecutionResponse++; | 131 buildCounterExecutionResponse++; |
| 132 if (buildCounterExecutionResponse < 3) { | 132 if (buildCounterExecutionResponse < 3) { |
| 133 o.result = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 133 o.result = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 134 } | 134 } |
| 135 buildCounterExecutionResponse--; | 135 buildCounterExecutionResponse--; |
| 136 return o; | 136 return o; |
| 137 } | 137 } |
| 138 | 138 |
| 139 checkExecutionResponse(api.ExecutionResponse o) { | 139 checkExecutionResponse(api.ExecutionResponse o) { |
| 140 buildCounterExecutionResponse++; | 140 buildCounterExecutionResponse++; |
| 141 if (buildCounterExecutionResponse < 3) { | 141 if (buildCounterExecutionResponse < 3) { |
| 142 var casted3 = (o.result) as core.Map; unittest.expect(casted3, unittest.hasL
ength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["strin
g"], unittest.equals('foo')); | 142 var casted3 = (o.result) as core.Map; unittest.expect(casted3, unittest.hasL
ength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["strin
g"], unittest.equals('foo')); |
| 143 } | 143 } |
| 144 buildCounterExecutionResponse--; | 144 buildCounterExecutionResponse--; |
| 145 } | 145 } |
| 146 | 146 |
| 147 buildUnnamed783() { | 147 buildUnnamed801() { |
| 148 var o = new core.List<core.String>(); | |
| 149 o.add("foo"); | |
| 150 o.add("foo"); | |
| 151 return o; | |
| 152 } | |
| 153 | |
| 154 checkUnnamed783(core.List<core.String> o) { | |
| 155 unittest.expect(o, unittest.hasLength(2)); | |
| 156 unittest.expect(o[0], unittest.equals('foo')); | |
| 157 unittest.expect(o[1], unittest.equals('foo')); | |
| 158 } | |
| 159 | |
| 160 core.int buildCounterJoinAsyncRequest = 0; | |
| 161 buildJoinAsyncRequest() { | |
| 162 var o = new api.JoinAsyncRequest(); | |
| 163 buildCounterJoinAsyncRequest++; | |
| 164 if (buildCounterJoinAsyncRequest < 3) { | |
| 165 o.names = buildUnnamed783(); | |
| 166 o.scriptId = "foo"; | |
| 167 o.timeout = "foo"; | |
| 168 } | |
| 169 buildCounterJoinAsyncRequest--; | |
| 170 return o; | |
| 171 } | |
| 172 | |
| 173 checkJoinAsyncRequest(api.JoinAsyncRequest o) { | |
| 174 buildCounterJoinAsyncRequest++; | |
| 175 if (buildCounterJoinAsyncRequest < 3) { | |
| 176 checkUnnamed783(o.names); | |
| 177 unittest.expect(o.scriptId, unittest.equals('foo')); | |
| 178 unittest.expect(o.timeout, unittest.equals('foo')); | |
| 179 } | |
| 180 buildCounterJoinAsyncRequest--; | |
| 181 } | |
| 182 | |
| 183 buildUnnamed784() { | |
| 184 var o = new core.Map<core.String, api.Operation>(); | |
| 185 o["x"] = buildOperation(); | |
| 186 o["y"] = buildOperation(); | |
| 187 return o; | |
| 188 } | |
| 189 | |
| 190 checkUnnamed784(core.Map<core.String, api.Operation> o) { | |
| 191 unittest.expect(o, unittest.hasLength(2)); | |
| 192 checkOperation(o["x"]); | |
| 193 checkOperation(o["y"]); | |
| 194 } | |
| 195 | |
| 196 core.int buildCounterJoinAsyncResponse = 0; | |
| 197 buildJoinAsyncResponse() { | |
| 198 var o = new api.JoinAsyncResponse(); | |
| 199 buildCounterJoinAsyncResponse++; | |
| 200 if (buildCounterJoinAsyncResponse < 3) { | |
| 201 o.results = buildUnnamed784(); | |
| 202 } | |
| 203 buildCounterJoinAsyncResponse--; | |
| 204 return o; | |
| 205 } | |
| 206 | |
| 207 checkJoinAsyncResponse(api.JoinAsyncResponse o) { | |
| 208 buildCounterJoinAsyncResponse++; | |
| 209 if (buildCounterJoinAsyncResponse < 3) { | |
| 210 checkUnnamed784(o.results); | |
| 211 } | |
| 212 buildCounterJoinAsyncResponse--; | |
| 213 } | |
| 214 | |
| 215 buildUnnamed785() { | |
| 216 var o = new core.Map<core.String, core.Object>(); | 148 var o = new core.Map<core.String, core.Object>(); |
| 217 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 149 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 218 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 150 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 219 return o; | 151 return o; |
| 220 } | 152 } |
| 221 | 153 |
| 222 checkUnnamed785(core.Map<core.String, core.Object> o) { | 154 checkUnnamed801(core.Map<core.String, core.Object> o) { |
| 223 unittest.expect(o, unittest.hasLength(2)); | 155 unittest.expect(o, unittest.hasLength(2)); |
| 224 var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 156 var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
| 225 var casted5 = (o["y"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 157 var casted5 = (o["y"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
| 226 } | 158 } |
| 227 | 159 |
| 228 buildUnnamed786() { | 160 buildUnnamed802() { |
| 229 var o = new core.Map<core.String, core.Object>(); | 161 var o = new core.Map<core.String, core.Object>(); |
| 230 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 162 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 231 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 163 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 232 return o; | 164 return o; |
| 233 } | 165 } |
| 234 | 166 |
| 235 checkUnnamed786(core.Map<core.String, core.Object> o) { | 167 checkUnnamed802(core.Map<core.String, core.Object> o) { |
| 236 unittest.expect(o, unittest.hasLength(2)); | 168 unittest.expect(o, unittest.hasLength(2)); |
| 237 var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 169 var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
| 238 var casted7 = (o["y"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 170 var casted7 = (o["y"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); |
| 239 } | 171 } |
| 240 | 172 |
| 241 core.int buildCounterOperation = 0; | 173 core.int buildCounterOperation = 0; |
| 242 buildOperation() { | 174 buildOperation() { |
| 243 var o = new api.Operation(); | 175 var o = new api.Operation(); |
| 244 buildCounterOperation++; | 176 buildCounterOperation++; |
| 245 if (buildCounterOperation < 3) { | 177 if (buildCounterOperation < 3) { |
| 246 o.done = true; | 178 o.done = true; |
| 247 o.error = buildStatus(); | 179 o.error = buildStatus(); |
| 248 o.metadata = buildUnnamed785(); | 180 o.metadata = buildUnnamed801(); |
| 249 o.name = "foo"; | 181 o.name = "foo"; |
| 250 o.response = buildUnnamed786(); | 182 o.response = buildUnnamed802(); |
| 251 } | 183 } |
| 252 buildCounterOperation--; | 184 buildCounterOperation--; |
| 253 return o; | 185 return o; |
| 254 } | 186 } |
| 255 | 187 |
| 256 checkOperation(api.Operation o) { | 188 checkOperation(api.Operation o) { |
| 257 buildCounterOperation++; | 189 buildCounterOperation++; |
| 258 if (buildCounterOperation < 3) { | 190 if (buildCounterOperation < 3) { |
| 259 unittest.expect(o.done, unittest.isTrue); | 191 unittest.expect(o.done, unittest.isTrue); |
| 260 checkStatus(o.error); | 192 checkStatus(o.error); |
| 261 checkUnnamed785(o.metadata); | 193 checkUnnamed801(o.metadata); |
| 262 unittest.expect(o.name, unittest.equals('foo')); | 194 unittest.expect(o.name, unittest.equals('foo')); |
| 263 checkUnnamed786(o.response); | 195 checkUnnamed802(o.response); |
| 264 } | 196 } |
| 265 buildCounterOperation--; | 197 buildCounterOperation--; |
| 266 } | 198 } |
| 267 | 199 |
| 268 core.int buildCounterScriptStackTraceElement = 0; | 200 core.int buildCounterScriptStackTraceElement = 0; |
| 269 buildScriptStackTraceElement() { | 201 buildScriptStackTraceElement() { |
| 270 var o = new api.ScriptStackTraceElement(); | 202 var o = new api.ScriptStackTraceElement(); |
| 271 buildCounterScriptStackTraceElement++; | 203 buildCounterScriptStackTraceElement++; |
| 272 if (buildCounterScriptStackTraceElement < 3) { | 204 if (buildCounterScriptStackTraceElement < 3) { |
| 273 o.function = "foo"; | 205 o.function = "foo"; |
| 274 o.lineNumber = 42; | 206 o.lineNumber = 42; |
| 275 } | 207 } |
| 276 buildCounterScriptStackTraceElement--; | 208 buildCounterScriptStackTraceElement--; |
| 277 return o; | 209 return o; |
| 278 } | 210 } |
| 279 | 211 |
| 280 checkScriptStackTraceElement(api.ScriptStackTraceElement o) { | 212 checkScriptStackTraceElement(api.ScriptStackTraceElement o) { |
| 281 buildCounterScriptStackTraceElement++; | 213 buildCounterScriptStackTraceElement++; |
| 282 if (buildCounterScriptStackTraceElement < 3) { | 214 if (buildCounterScriptStackTraceElement < 3) { |
| 283 unittest.expect(o.function, unittest.equals('foo')); | 215 unittest.expect(o.function, unittest.equals('foo')); |
| 284 unittest.expect(o.lineNumber, unittest.equals(42)); | 216 unittest.expect(o.lineNumber, unittest.equals(42)); |
| 285 } | 217 } |
| 286 buildCounterScriptStackTraceElement--; | 218 buildCounterScriptStackTraceElement--; |
| 287 } | 219 } |
| 288 | 220 |
| 289 buildUnnamed787() { | 221 buildUnnamed803() { |
| 290 var o = new core.Map<core.String, core.Object>(); | 222 var o = new core.Map<core.String, core.Object>(); |
| 291 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 223 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 292 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 224 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 293 return o; | 225 return o; |
| 294 } | 226 } |
| 295 | 227 |
| 296 checkUnnamed787(core.Map<core.String, core.Object> o) { | 228 checkUnnamed803(core.Map<core.String, core.Object> o) { |
| 297 unittest.expect(o, unittest.hasLength(2)); | 229 unittest.expect(o, unittest.hasLength(2)); |
| 298 var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 230 var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); |
| 299 var casted9 = (o["y"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); | 231 var casted9 = (o["y"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); |
| 300 } | 232 } |
| 301 | 233 |
| 302 buildUnnamed788() { | 234 buildUnnamed804() { |
| 303 var o = new core.List<core.Map<core.String, core.Object>>(); | 235 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 304 o.add(buildUnnamed787()); | 236 o.add(buildUnnamed803()); |
| 305 o.add(buildUnnamed787()); | 237 o.add(buildUnnamed803()); |
| 306 return o; | 238 return o; |
| 307 } | 239 } |
| 308 | 240 |
| 309 checkUnnamed788(core.List<core.Map<core.String, core.Object>> o) { | 241 checkUnnamed804(core.List<core.Map<core.String, core.Object>> o) { |
| 310 unittest.expect(o, unittest.hasLength(2)); | 242 unittest.expect(o, unittest.hasLength(2)); |
| 311 checkUnnamed787(o[0]); | 243 checkUnnamed803(o[0]); |
| 312 checkUnnamed787(o[1]); | 244 checkUnnamed803(o[1]); |
| 313 } | 245 } |
| 314 | 246 |
| 315 core.int buildCounterStatus = 0; | 247 core.int buildCounterStatus = 0; |
| 316 buildStatus() { | 248 buildStatus() { |
| 317 var o = new api.Status(); | 249 var o = new api.Status(); |
| 318 buildCounterStatus++; | 250 buildCounterStatus++; |
| 319 if (buildCounterStatus < 3) { | 251 if (buildCounterStatus < 3) { |
| 320 o.code = 42; | 252 o.code = 42; |
| 321 o.details = buildUnnamed788(); | 253 o.details = buildUnnamed804(); |
| 322 o.message = "foo"; | 254 o.message = "foo"; |
| 323 } | 255 } |
| 324 buildCounterStatus--; | 256 buildCounterStatus--; |
| 325 return o; | 257 return o; |
| 326 } | 258 } |
| 327 | 259 |
| 328 checkStatus(api.Status o) { | 260 checkStatus(api.Status o) { |
| 329 buildCounterStatus++; | 261 buildCounterStatus++; |
| 330 if (buildCounterStatus < 3) { | 262 if (buildCounterStatus < 3) { |
| 331 unittest.expect(o.code, unittest.equals(42)); | 263 unittest.expect(o.code, unittest.equals(42)); |
| 332 checkUnnamed788(o.details); | 264 checkUnnamed804(o.details); |
| 333 unittest.expect(o.message, unittest.equals('foo')); | 265 unittest.expect(o.message, unittest.equals('foo')); |
| 334 } | 266 } |
| 335 buildCounterStatus--; | 267 buildCounterStatus--; |
| 336 } | 268 } |
| 337 | 269 |
| 338 | 270 |
| 339 main() { | 271 main() { |
| 340 unittest.group("obj-schema-ExecutionError", () { | 272 unittest.group("obj-schema-ExecutionError", () { |
| 341 unittest.test("to-json--from-json", () { | 273 unittest.test("to-json--from-json", () { |
| 342 var o = buildExecutionError(); | 274 var o = buildExecutionError(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 357 | 289 |
| 358 unittest.group("obj-schema-ExecutionResponse", () { | 290 unittest.group("obj-schema-ExecutionResponse", () { |
| 359 unittest.test("to-json--from-json", () { | 291 unittest.test("to-json--from-json", () { |
| 360 var o = buildExecutionResponse(); | 292 var o = buildExecutionResponse(); |
| 361 var od = new api.ExecutionResponse.fromJson(o.toJson()); | 293 var od = new api.ExecutionResponse.fromJson(o.toJson()); |
| 362 checkExecutionResponse(od); | 294 checkExecutionResponse(od); |
| 363 }); | 295 }); |
| 364 }); | 296 }); |
| 365 | 297 |
| 366 | 298 |
| 367 unittest.group("obj-schema-JoinAsyncRequest", () { | |
| 368 unittest.test("to-json--from-json", () { | |
| 369 var o = buildJoinAsyncRequest(); | |
| 370 var od = new api.JoinAsyncRequest.fromJson(o.toJson()); | |
| 371 checkJoinAsyncRequest(od); | |
| 372 }); | |
| 373 }); | |
| 374 | |
| 375 | |
| 376 unittest.group("obj-schema-JoinAsyncResponse", () { | |
| 377 unittest.test("to-json--from-json", () { | |
| 378 var o = buildJoinAsyncResponse(); | |
| 379 var od = new api.JoinAsyncResponse.fromJson(o.toJson()); | |
| 380 checkJoinAsyncResponse(od); | |
| 381 }); | |
| 382 }); | |
| 383 | |
| 384 | |
| 385 unittest.group("obj-schema-Operation", () { | 299 unittest.group("obj-schema-Operation", () { |
| 386 unittest.test("to-json--from-json", () { | 300 unittest.test("to-json--from-json", () { |
| 387 var o = buildOperation(); | 301 var o = buildOperation(); |
| 388 var od = new api.Operation.fromJson(o.toJson()); | 302 var od = new api.Operation.fromJson(o.toJson()); |
| 389 checkOperation(od); | 303 checkOperation(od); |
| 390 }); | 304 }); |
| 391 }); | 305 }); |
| 392 | 306 |
| 393 | 307 |
| 394 unittest.group("obj-schema-ScriptStackTraceElement", () { | 308 unittest.group("obj-schema-ScriptStackTraceElement", () { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 res.run(arg_request, arg_scriptId).then(unittest.expectAsync1(((api.Operat
ion response) { | 377 res.run(arg_request, arg_scriptId).then(unittest.expectAsync1(((api.Operat
ion response) { |
| 464 checkOperation(response); | 378 checkOperation(response); |
| 465 }))); | 379 }))); |
| 466 }); | 380 }); |
| 467 | 381 |
| 468 }); | 382 }); |
| 469 | 383 |
| 470 | 384 |
| 471 } | 385 } |
| 472 | 386 |
| OLD | NEW |