| Index: generated/googleapis/test/script/v1_test.dart
|
| diff --git a/generated/googleapis/test/script/v1_test.dart b/generated/googleapis/test/script/v1_test.dart
|
| index 02f9e7cb97601cb4b733fe24b5efcd81e5018820..1233fd283c477b4e2e40bde89d8bfcd3afdb2b15 100644
|
| --- a/generated/googleapis/test/script/v1_test.dart
|
| +++ b/generated/googleapis/test/script/v1_test.dart
|
| @@ -7,7 +7,7 @@ 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:test/test.dart' as unittest;
|
|
|
| import 'package:googleapis/script/v1.dart' as api;
|
|
|
| @@ -46,19 +46,19 @@ class HttpServerMock extends http.BaseClient {
|
| }
|
|
|
| http.StreamedResponse stringResponse(
|
| - core.int status, core.Map headers, core.String body) {
|
| + core.int status, core.Map<core.String, core.String> headers, core.String body) {
|
| var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
|
| return new http.StreamedResponse(stream, status, headers: headers);
|
| }
|
|
|
| -buildUnnamed724() {
|
| +buildUnnamed731() {
|
| var o = new core.List<api.ScriptStackTraceElement>();
|
| o.add(buildScriptStackTraceElement());
|
| o.add(buildScriptStackTraceElement());
|
| return o;
|
| }
|
|
|
| -checkUnnamed724(core.List<api.ScriptStackTraceElement> o) {
|
| +checkUnnamed731(core.List<api.ScriptStackTraceElement> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkScriptStackTraceElement(o[0]);
|
| checkScriptStackTraceElement(o[1]);
|
| @@ -71,7 +71,7 @@ buildExecutionError() {
|
| if (buildCounterExecutionError < 3) {
|
| o.errorMessage = "foo";
|
| o.errorType = "foo";
|
| - o.scriptStackTraceElements = buildUnnamed724();
|
| + o.scriptStackTraceElements = buildUnnamed731();
|
| }
|
| buildCounterExecutionError--;
|
| return o;
|
| @@ -82,19 +82,19 @@ checkExecutionError(api.ExecutionError o) {
|
| if (buildCounterExecutionError < 3) {
|
| unittest.expect(o.errorMessage, unittest.equals('foo'));
|
| unittest.expect(o.errorType, unittest.equals('foo'));
|
| - checkUnnamed724(o.scriptStackTraceElements);
|
| + checkUnnamed731(o.scriptStackTraceElements);
|
| }
|
| buildCounterExecutionError--;
|
| }
|
|
|
| -buildUnnamed725() {
|
| +buildUnnamed732() {
|
| var o = new core.List<core.Object>();
|
| o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
|
| o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
|
| return o;
|
| }
|
|
|
| -checkUnnamed725(core.List<core.Object> o) {
|
| +checkUnnamed732(core.List<core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo'));
|
| var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo'));
|
| @@ -107,7 +107,7 @@ buildExecutionRequest() {
|
| if (buildCounterExecutionRequest < 3) {
|
| o.devMode = true;
|
| o.function = "foo";
|
| - o.parameters = buildUnnamed725();
|
| + o.parameters = buildUnnamed732();
|
| o.sessionState = "foo";
|
| }
|
| buildCounterExecutionRequest--;
|
| @@ -119,7 +119,7 @@ checkExecutionRequest(api.ExecutionRequest o) {
|
| if (buildCounterExecutionRequest < 3) {
|
| unittest.expect(o.devMode, unittest.isTrue);
|
| unittest.expect(o.function, unittest.equals('foo'));
|
| - checkUnnamed725(o.parameters);
|
| + checkUnnamed732(o.parameters);
|
| unittest.expect(o.sessionState, unittest.equals('foo'));
|
| }
|
| buildCounterExecutionRequest--;
|
| @@ -144,14 +144,14 @@ checkExecutionResponse(api.ExecutionResponse o) {
|
| buildCounterExecutionResponse--;
|
| }
|
|
|
| -buildUnnamed726() {
|
| +buildUnnamed733() {
|
| var o = new core.List<core.String>();
|
| o.add("foo");
|
| o.add("foo");
|
| return o;
|
| }
|
|
|
| -checkUnnamed726(core.List<core.String> o) {
|
| +checkUnnamed733(core.List<core.String> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| unittest.expect(o[0], unittest.equals('foo'));
|
| unittest.expect(o[1], unittest.equals('foo'));
|
| @@ -162,7 +162,7 @@ buildJoinAsyncRequest() {
|
| var o = new api.JoinAsyncRequest();
|
| buildCounterJoinAsyncRequest++;
|
| if (buildCounterJoinAsyncRequest < 3) {
|
| - o.names = buildUnnamed726();
|
| + o.names = buildUnnamed733();
|
| o.scriptId = "foo";
|
| o.timeout = "foo";
|
| }
|
| @@ -173,21 +173,21 @@ buildJoinAsyncRequest() {
|
| checkJoinAsyncRequest(api.JoinAsyncRequest o) {
|
| buildCounterJoinAsyncRequest++;
|
| if (buildCounterJoinAsyncRequest < 3) {
|
| - checkUnnamed726(o.names);
|
| + checkUnnamed733(o.names);
|
| unittest.expect(o.scriptId, unittest.equals('foo'));
|
| unittest.expect(o.timeout, unittest.equals('foo'));
|
| }
|
| buildCounterJoinAsyncRequest--;
|
| }
|
|
|
| -buildUnnamed727() {
|
| +buildUnnamed734() {
|
| var o = new core.Map<core.String, api.Operation>();
|
| o["x"] = buildOperation();
|
| o["y"] = buildOperation();
|
| return o;
|
| }
|
|
|
| -checkUnnamed727(core.Map<core.String, api.Operation> o) {
|
| +checkUnnamed734(core.Map<core.String, api.Operation> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| checkOperation(o["x"]);
|
| checkOperation(o["y"]);
|
| @@ -198,7 +198,7 @@ buildJoinAsyncResponse() {
|
| var o = new api.JoinAsyncResponse();
|
| buildCounterJoinAsyncResponse++;
|
| if (buildCounterJoinAsyncResponse < 3) {
|
| - o.results = buildUnnamed727();
|
| + o.results = buildUnnamed734();
|
| }
|
| buildCounterJoinAsyncResponse--;
|
| return o;
|
| @@ -207,32 +207,32 @@ buildJoinAsyncResponse() {
|
| checkJoinAsyncResponse(api.JoinAsyncResponse o) {
|
| buildCounterJoinAsyncResponse++;
|
| if (buildCounterJoinAsyncResponse < 3) {
|
| - checkUnnamed727(o.results);
|
| + checkUnnamed734(o.results);
|
| }
|
| buildCounterJoinAsyncResponse--;
|
| }
|
|
|
| -buildUnnamed728() {
|
| +buildUnnamed735() {
|
| var o = new core.Map<core.String, core.Object>();
|
| o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| return o;
|
| }
|
|
|
| -checkUnnamed728(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed735(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLength(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo'));
|
| var casted5 = (o["y"]) as core.Map; unittest.expect(casted5, unittest.hasLength(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], unittest.equals('foo'));
|
| }
|
|
|
| -buildUnnamed729() {
|
| +buildUnnamed736() {
|
| var o = new core.Map<core.String, core.Object>();
|
| o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| return o;
|
| }
|
|
|
| -checkUnnamed729(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed736(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLength(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], unittest.equals('foo'));
|
| var casted7 = (o["y"]) as core.Map; unittest.expect(casted7, unittest.hasLength(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.expect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"], unittest.equals('foo'));
|
| @@ -245,9 +245,9 @@ buildOperation() {
|
| if (buildCounterOperation < 3) {
|
| o.done = true;
|
| o.error = buildStatus();
|
| - o.metadata = buildUnnamed728();
|
| + o.metadata = buildUnnamed735();
|
| o.name = "foo";
|
| - o.response = buildUnnamed729();
|
| + o.response = buildUnnamed736();
|
| }
|
| buildCounterOperation--;
|
| return o;
|
| @@ -258,9 +258,9 @@ checkOperation(api.Operation o) {
|
| if (buildCounterOperation < 3) {
|
| unittest.expect(o.done, unittest.isTrue);
|
| checkStatus(o.error);
|
| - checkUnnamed728(o.metadata);
|
| + checkUnnamed735(o.metadata);
|
| unittest.expect(o.name, unittest.equals('foo'));
|
| - checkUnnamed729(o.response);
|
| + checkUnnamed736(o.response);
|
| }
|
| buildCounterOperation--;
|
| }
|
| @@ -286,30 +286,30 @@ checkScriptStackTraceElement(api.ScriptStackTraceElement o) {
|
| buildCounterScriptStackTraceElement--;
|
| }
|
|
|
| -buildUnnamed730() {
|
| +buildUnnamed737() {
|
| var o = new core.Map<core.String, core.Object>();
|
| o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
|
| return o;
|
| }
|
|
|
| -checkUnnamed730(core.Map<core.String, core.Object> o) {
|
| +checkUnnamed737(core.Map<core.String, core.Object> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLength(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.expect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"], unittest.equals('foo'));
|
| var casted9 = (o["y"]) as core.Map; unittest.expect(casted9, unittest.hasLength(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.expect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"], unittest.equals('foo'));
|
| }
|
|
|
| -buildUnnamed731() {
|
| +buildUnnamed738() {
|
| var o = new core.List<core.Map<core.String, core.Object>>();
|
| - o.add(buildUnnamed730());
|
| - o.add(buildUnnamed730());
|
| + o.add(buildUnnamed737());
|
| + o.add(buildUnnamed737());
|
| return o;
|
| }
|
|
|
| -checkUnnamed731(core.List<core.Map<core.String, core.Object>> o) {
|
| +checkUnnamed738(core.List<core.Map<core.String, core.Object>> o) {
|
| unittest.expect(o, unittest.hasLength(2));
|
| - checkUnnamed730(o[0]);
|
| - checkUnnamed730(o[1]);
|
| + checkUnnamed737(o[0]);
|
| + checkUnnamed737(o[1]);
|
| }
|
|
|
| core.int buildCounterStatus = 0;
|
| @@ -318,7 +318,7 @@ buildStatus() {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| o.code = 42;
|
| - o.details = buildUnnamed731();
|
| + o.details = buildUnnamed738();
|
| o.message = "foo";
|
| }
|
| buildCounterStatus--;
|
| @@ -329,7 +329,7 @@ checkStatus(api.Status o) {
|
| buildCounterStatus++;
|
| if (buildCounterStatus < 3) {
|
| unittest.expect(o.code, unittest.equals(42));
|
| - checkUnnamed731(o.details);
|
| + checkUnnamed738(o.details);
|
| unittest.expect(o.message, unittest.equals('foo'));
|
| }
|
| buildCounterStatus--;
|
| @@ -416,7 +416,7 @@ main() {
|
| api.ScriptsResourceApi res = new api.ScriptApi(mock).scripts;
|
| var arg_request = buildExecutionRequest();
|
| var arg_scriptId = "foo";
|
| - mock.register(unittest.expectAsync((http.BaseRequest req, json) {
|
| + mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
|
| var obj = new api.ExecutionRequest.fromJson(json);
|
| checkExecutionRequest(obj);
|
|
|
| @@ -460,7 +460,7 @@ main() {
|
| var resp = convert.JSON.encode(buildOperation());
|
| return new async.Future.value(stringResponse(200, h, resp));
|
| }), true);
|
| - res.run(arg_request, arg_scriptId).then(unittest.expectAsync(((api.Operation response) {
|
| + res.run(arg_request, arg_scriptId).then(unittest.expectAsync1(((api.Operation response) {
|
| checkOperation(response);
|
| })));
|
| });
|
|
|