Index: generated/googleapis_beta/test/deploymentmanager/v2beta2_test.dart |
diff --git a/generated/googleapis_beta/test/deploymentmanager/v2beta1_test.dart b/generated/googleapis_beta/test/deploymentmanager/v2beta2_test.dart |
similarity index 72% |
copy from generated/googleapis_beta/test/deploymentmanager/v2beta1_test.dart |
copy to generated/googleapis_beta/test/deploymentmanager/v2beta2_test.dart |
index 86ba11a9ccf4e1f4f8762ff503b27bd61495d573..25b97d55c5a7dcad51e022bc9b77903886ecdff5 100644 |
--- a/generated/googleapis_beta/test/deploymentmanager/v2beta1_test.dart |
+++ b/generated/googleapis_beta/test/deploymentmanager/v2beta2_test.dart |
@@ -1,4 +1,4 @@ |
-library googleapis_beta.deploymentmanager.v2beta1.test; |
+library googleapis_beta.deploymentmanager.v2beta2.test; |
import "dart:core" as core; |
import "dart:collection" as collection; |
@@ -9,7 +9,7 @@ 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_beta/deploymentmanager/v2beta1.dart' as api; |
+import 'package:googleapis_beta/deploymentmanager/v2beta2.dart' as api; |
class HttpServerMock extends http.BaseClient { |
core.Function _callback; |
@@ -57,10 +57,16 @@ buildDeployment() { |
buildCounterDeployment++; |
if (buildCounterDeployment < 3) { |
o.description = "foo"; |
+ o.fingerprint = "foo"; |
o.id = "foo"; |
+ o.insertTime = "foo"; |
+ o.intent = "foo"; |
o.manifest = "foo"; |
o.name = "foo"; |
- o.targetConfig = "foo"; |
+ o.state = "foo"; |
+ o.target = buildTargetConfiguration(); |
+ o.update = buildDeploymentUpdate(); |
+ o.updateTime = "foo"; |
} |
buildCounterDeployment--; |
return o; |
@@ -70,22 +76,62 @@ checkDeployment(api.Deployment o) { |
buildCounterDeployment++; |
if (buildCounterDeployment < 3) { |
unittest.expect(o.description, unittest.equals('foo')); |
+ unittest.expect(o.fingerprint, unittest.equals('foo')); |
unittest.expect(o.id, unittest.equals('foo')); |
+ unittest.expect(o.insertTime, unittest.equals('foo')); |
+ unittest.expect(o.intent, unittest.equals('foo')); |
unittest.expect(o.manifest, unittest.equals('foo')); |
unittest.expect(o.name, unittest.equals('foo')); |
- unittest.expect(o.targetConfig, unittest.equals('foo')); |
+ unittest.expect(o.state, unittest.equals('foo')); |
+ checkTargetConfiguration(o.target); |
+ checkDeploymentUpdate(o.update); |
+ unittest.expect(o.updateTime, unittest.equals('foo')); |
} |
buildCounterDeployment--; |
} |
-buildUnnamed1656() { |
+buildUnnamed2354() { |
+ var o = new core.List<core.String>(); |
+ o.add("foo"); |
+ o.add("foo"); |
+ return o; |
+} |
+ |
+checkUnnamed2354(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')); |
+} |
+ |
+core.int buildCounterDeploymentUpdate = 0; |
+buildDeploymentUpdate() { |
+ var o = new api.DeploymentUpdate(); |
+ buildCounterDeploymentUpdate++; |
+ if (buildCounterDeploymentUpdate < 3) { |
+ o.errors = buildUnnamed2354(); |
+ o.manifest = "foo"; |
+ } |
+ buildCounterDeploymentUpdate--; |
+ return o; |
+} |
+ |
+checkDeploymentUpdate(api.DeploymentUpdate o) { |
+ buildCounterDeploymentUpdate++; |
+ if (buildCounterDeploymentUpdate < 3) { |
+ checkUnnamed2354(o.errors); |
+ unittest.expect(o.manifest, unittest.equals('foo')); |
+ } |
+ buildCounterDeploymentUpdate--; |
+} |
+ |
+buildUnnamed2355() { |
var o = new core.List<api.Deployment>(); |
o.add(buildDeployment()); |
o.add(buildDeployment()); |
return o; |
} |
-checkUnnamed1656(core.List<api.Deployment> o) { |
+checkUnnamed2355(core.List<api.Deployment> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkDeployment(o[0]); |
checkDeployment(o[1]); |
@@ -96,7 +142,7 @@ buildDeploymentsListResponse() { |
var o = new api.DeploymentsListResponse(); |
buildCounterDeploymentsListResponse++; |
if (buildCounterDeploymentsListResponse < 3) { |
- o.deployments = buildUnnamed1656(); |
+ o.deployments = buildUnnamed2355(); |
o.nextPageToken = "foo"; |
} |
buildCounterDeploymentsListResponse--; |
@@ -106,12 +152,46 @@ buildDeploymentsListResponse() { |
checkDeploymentsListResponse(api.DeploymentsListResponse o) { |
buildCounterDeploymentsListResponse++; |
if (buildCounterDeploymentsListResponse < 3) { |
- checkUnnamed1656(o.deployments); |
+ checkUnnamed2355(o.deployments); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
} |
buildCounterDeploymentsListResponse--; |
} |
+core.int buildCounterImportFile = 0; |
+buildImportFile() { |
+ var o = new api.ImportFile(); |
+ buildCounterImportFile++; |
+ if (buildCounterImportFile < 3) { |
+ o.content = "foo"; |
+ o.name = "foo"; |
+ } |
+ buildCounterImportFile--; |
+ return o; |
+} |
+ |
+checkImportFile(api.ImportFile o) { |
+ buildCounterImportFile++; |
+ if (buildCounterImportFile < 3) { |
+ unittest.expect(o.content, unittest.equals('foo')); |
+ unittest.expect(o.name, unittest.equals('foo')); |
+ } |
+ buildCounterImportFile--; |
+} |
+ |
+buildUnnamed2356() { |
+ var o = new core.List<api.ImportFile>(); |
+ o.add(buildImportFile()); |
+ o.add(buildImportFile()); |
+ return o; |
+} |
+ |
+checkUnnamed2356(core.List<api.ImportFile> o) { |
+ unittest.expect(o, unittest.hasLength(2)); |
+ checkImportFile(o[0]); |
+ checkImportFile(o[1]); |
+} |
+ |
core.int buildCounterManifest = 0; |
buildManifest() { |
var o = new api.Manifest(); |
@@ -120,6 +200,9 @@ buildManifest() { |
o.config = "foo"; |
o.evaluatedConfig = "foo"; |
o.id = "foo"; |
+ o.imports = buildUnnamed2356(); |
+ o.insertTime = "foo"; |
+ o.layout = "foo"; |
o.name = "foo"; |
o.selfLink = "foo"; |
} |
@@ -133,20 +216,23 @@ checkManifest(api.Manifest o) { |
unittest.expect(o.config, unittest.equals('foo')); |
unittest.expect(o.evaluatedConfig, unittest.equals('foo')); |
unittest.expect(o.id, unittest.equals('foo')); |
+ checkUnnamed2356(o.imports); |
+ unittest.expect(o.insertTime, unittest.equals('foo')); |
+ unittest.expect(o.layout, unittest.equals('foo')); |
unittest.expect(o.name, unittest.equals('foo')); |
unittest.expect(o.selfLink, unittest.equals('foo')); |
} |
buildCounterManifest--; |
} |
-buildUnnamed1657() { |
+buildUnnamed2357() { |
var o = new core.List<api.Manifest>(); |
o.add(buildManifest()); |
o.add(buildManifest()); |
return o; |
} |
-checkUnnamed1657(core.List<api.Manifest> o) { |
+checkUnnamed2357(core.List<api.Manifest> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkManifest(o[0]); |
checkManifest(o[1]); |
@@ -157,7 +243,7 @@ buildManifestsListResponse() { |
var o = new api.ManifestsListResponse(); |
buildCounterManifestsListResponse++; |
if (buildCounterManifestsListResponse < 3) { |
- o.manifests = buildUnnamed1657(); |
+ o.manifests = buildUnnamed2357(); |
o.nextPageToken = "foo"; |
} |
buildCounterManifestsListResponse--; |
@@ -167,7 +253,7 @@ buildManifestsListResponse() { |
checkManifestsListResponse(api.ManifestsListResponse o) { |
buildCounterManifestsListResponse++; |
if (buildCounterManifestsListResponse < 3) { |
- checkUnnamed1657(o.manifests); |
+ checkUnnamed2357(o.manifests); |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
} |
buildCounterManifestsListResponse--; |
@@ -196,14 +282,14 @@ checkOperationErrorErrors(api.OperationErrorErrors o) { |
buildCounterOperationErrorErrors--; |
} |
-buildUnnamed1658() { |
+buildUnnamed2358() { |
var o = new core.List<api.OperationErrorErrors>(); |
o.add(buildOperationErrorErrors()); |
o.add(buildOperationErrorErrors()); |
return o; |
} |
-checkUnnamed1658(core.List<api.OperationErrorErrors> o) { |
+checkUnnamed2358(core.List<api.OperationErrorErrors> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkOperationErrorErrors(o[0]); |
checkOperationErrorErrors(o[1]); |
@@ -214,7 +300,7 @@ buildOperationError() { |
var o = new api.OperationError(); |
buildCounterOperationError++; |
if (buildCounterOperationError < 3) { |
- o.errors = buildUnnamed1658(); |
+ o.errors = buildUnnamed2358(); |
} |
buildCounterOperationError--; |
return o; |
@@ -223,7 +309,7 @@ buildOperationError() { |
checkOperationError(api.OperationError o) { |
buildCounterOperationError++; |
if (buildCounterOperationError < 3) { |
- checkUnnamed1658(o.errors); |
+ checkUnnamed2358(o.errors); |
} |
buildCounterOperationError--; |
} |
@@ -249,14 +335,14 @@ checkOperationWarningsData(api.OperationWarningsData o) { |
buildCounterOperationWarningsData--; |
} |
-buildUnnamed1659() { |
+buildUnnamed2359() { |
var o = new core.List<api.OperationWarningsData>(); |
o.add(buildOperationWarningsData()); |
o.add(buildOperationWarningsData()); |
return o; |
} |
-checkUnnamed1659(core.List<api.OperationWarningsData> o) { |
+checkUnnamed2359(core.List<api.OperationWarningsData> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkOperationWarningsData(o[0]); |
checkOperationWarningsData(o[1]); |
@@ -267,8 +353,8 @@ buildOperationWarnings() { |
var o = new api.OperationWarnings(); |
buildCounterOperationWarnings++; |
if (buildCounterOperationWarnings < 3) { |
- o.code = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
- o.data = buildUnnamed1659(); |
+ o.code = "foo"; |
+ o.data = buildUnnamed2359(); |
o.message = "foo"; |
} |
buildCounterOperationWarnings--; |
@@ -278,21 +364,21 @@ buildOperationWarnings() { |
checkOperationWarnings(api.OperationWarnings o) { |
buildCounterOperationWarnings++; |
if (buildCounterOperationWarnings < 3) { |
- var casted1 = (o.code) 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')); |
- checkUnnamed1659(o.data); |
+ unittest.expect(o.code, unittest.equals('foo')); |
+ checkUnnamed2359(o.data); |
unittest.expect(o.message, unittest.equals('foo')); |
} |
buildCounterOperationWarnings--; |
} |
-buildUnnamed1660() { |
+buildUnnamed2360() { |
var o = new core.List<api.OperationWarnings>(); |
o.add(buildOperationWarnings()); |
o.add(buildOperationWarnings()); |
return o; |
} |
-checkUnnamed1660(core.List<api.OperationWarnings> o) { |
+checkUnnamed2360(core.List<api.OperationWarnings> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkOperationWarnings(o[0]); |
checkOperationWarnings(o[1]); |
@@ -303,6 +389,7 @@ buildOperation() { |
var o = new api.Operation(); |
buildCounterOperation++; |
if (buildCounterOperation < 3) { |
+ o.clientOperationId = "foo"; |
o.creationTimestamp = "foo"; |
o.endTime = "foo"; |
o.error = buildOperationError(); |
@@ -310,9 +397,11 @@ buildOperation() { |
o.httpErrorStatusCode = 42; |
o.id = "foo"; |
o.insertTime = "foo"; |
+ o.kind = "foo"; |
o.name = "foo"; |
o.operationType = "foo"; |
o.progress = 42; |
+ o.region = "foo"; |
o.selfLink = "foo"; |
o.startTime = "foo"; |
o.status = "foo"; |
@@ -320,7 +409,8 @@ buildOperation() { |
o.targetId = "foo"; |
o.targetLink = "foo"; |
o.user = "foo"; |
- o.warnings = buildUnnamed1660(); |
+ o.warnings = buildUnnamed2360(); |
+ o.zone = "foo"; |
} |
buildCounterOperation--; |
return o; |
@@ -329,6 +419,7 @@ buildOperation() { |
checkOperation(api.Operation o) { |
buildCounterOperation++; |
if (buildCounterOperation < 3) { |
+ unittest.expect(o.clientOperationId, unittest.equals('foo')); |
unittest.expect(o.creationTimestamp, unittest.equals('foo')); |
unittest.expect(o.endTime, unittest.equals('foo')); |
checkOperationError(o.error); |
@@ -336,9 +427,11 @@ checkOperation(api.Operation o) { |
unittest.expect(o.httpErrorStatusCode, unittest.equals(42)); |
unittest.expect(o.id, unittest.equals('foo')); |
unittest.expect(o.insertTime, unittest.equals('foo')); |
+ unittest.expect(o.kind, unittest.equals('foo')); |
unittest.expect(o.name, unittest.equals('foo')); |
unittest.expect(o.operationType, unittest.equals('foo')); |
unittest.expect(o.progress, unittest.equals(42)); |
+ unittest.expect(o.region, unittest.equals('foo')); |
unittest.expect(o.selfLink, unittest.equals('foo')); |
unittest.expect(o.startTime, unittest.equals('foo')); |
unittest.expect(o.status, unittest.equals('foo')); |
@@ -346,19 +439,20 @@ checkOperation(api.Operation o) { |
unittest.expect(o.targetId, unittest.equals('foo')); |
unittest.expect(o.targetLink, unittest.equals('foo')); |
unittest.expect(o.user, unittest.equals('foo')); |
- checkUnnamed1660(o.warnings); |
+ checkUnnamed2360(o.warnings); |
+ unittest.expect(o.zone, unittest.equals('foo')); |
} |
buildCounterOperation--; |
} |
-buildUnnamed1661() { |
+buildUnnamed2361() { |
var o = new core.List<api.Operation>(); |
o.add(buildOperation()); |
o.add(buildOperation()); |
return o; |
} |
-checkUnnamed1661(core.List<api.Operation> o) { |
+checkUnnamed2361(core.List<api.Operation> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkOperation(o[0]); |
checkOperation(o[1]); |
@@ -370,7 +464,7 @@ buildOperationsListResponse() { |
buildCounterOperationsListResponse++; |
if (buildCounterOperationsListResponse < 3) { |
o.nextPageToken = "foo"; |
- o.operations = buildUnnamed1661(); |
+ o.operations = buildUnnamed2361(); |
} |
buildCounterOperationsListResponse--; |
return o; |
@@ -380,36 +474,25 @@ checkOperationsListResponse(api.OperationsListResponse o) { |
buildCounterOperationsListResponse++; |
if (buildCounterOperationsListResponse < 3) { |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed1661(o.operations); |
+ checkUnnamed2361(o.operations); |
} |
buildCounterOperationsListResponse--; |
} |
-buildUnnamed1662() { |
- var o = new core.List<core.String>(); |
- o.add("foo"); |
- o.add("foo"); |
- return o; |
-} |
- |
-checkUnnamed1662(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')); |
-} |
- |
core.int buildCounterResource = 0; |
buildResource() { |
var o = new api.Resource(); |
buildCounterResource++; |
if (buildCounterResource < 3) { |
- o.errors = buildUnnamed1662(); |
+ o.finalProperties = "foo"; |
o.id = "foo"; |
- o.intent = "foo"; |
+ o.insertTime = "foo"; |
o.manifest = "foo"; |
o.name = "foo"; |
- o.state = "foo"; |
+ o.properties = "foo"; |
o.type = "foo"; |
+ o.update = buildResourceUpdate(); |
+ o.updateTime = "foo"; |
o.url = "foo"; |
} |
buildCounterResource--; |
@@ -419,26 +502,70 @@ buildResource() { |
checkResource(api.Resource o) { |
buildCounterResource++; |
if (buildCounterResource < 3) { |
- checkUnnamed1662(o.errors); |
+ unittest.expect(o.finalProperties, unittest.equals('foo')); |
unittest.expect(o.id, unittest.equals('foo')); |
- unittest.expect(o.intent, unittest.equals('foo')); |
+ unittest.expect(o.insertTime, unittest.equals('foo')); |
unittest.expect(o.manifest, unittest.equals('foo')); |
unittest.expect(o.name, unittest.equals('foo')); |
- unittest.expect(o.state, unittest.equals('foo')); |
+ unittest.expect(o.properties, unittest.equals('foo')); |
unittest.expect(o.type, unittest.equals('foo')); |
+ checkResourceUpdate(o.update); |
+ unittest.expect(o.updateTime, unittest.equals('foo')); |
unittest.expect(o.url, unittest.equals('foo')); |
} |
buildCounterResource--; |
} |
-buildUnnamed1663() { |
+buildUnnamed2362() { |
+ var o = new core.List<core.String>(); |
+ o.add("foo"); |
+ o.add("foo"); |
+ return o; |
+} |
+ |
+checkUnnamed2362(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')); |
+} |
+ |
+core.int buildCounterResourceUpdate = 0; |
+buildResourceUpdate() { |
+ var o = new api.ResourceUpdate(); |
+ buildCounterResourceUpdate++; |
+ if (buildCounterResourceUpdate < 3) { |
+ o.errors = buildUnnamed2362(); |
+ o.finalProperties = "foo"; |
+ o.intent = "foo"; |
+ o.manifest = "foo"; |
+ o.properties = "foo"; |
+ o.state = "foo"; |
+ } |
+ buildCounterResourceUpdate--; |
+ return o; |
+} |
+ |
+checkResourceUpdate(api.ResourceUpdate o) { |
+ buildCounterResourceUpdate++; |
+ if (buildCounterResourceUpdate < 3) { |
+ checkUnnamed2362(o.errors); |
+ unittest.expect(o.finalProperties, unittest.equals('foo')); |
+ unittest.expect(o.intent, unittest.equals('foo')); |
+ unittest.expect(o.manifest, unittest.equals('foo')); |
+ unittest.expect(o.properties, unittest.equals('foo')); |
+ unittest.expect(o.state, unittest.equals('foo')); |
+ } |
+ buildCounterResourceUpdate--; |
+} |
+ |
+buildUnnamed2363() { |
var o = new core.List<api.Resource>(); |
o.add(buildResource()); |
o.add(buildResource()); |
return o; |
} |
-checkUnnamed1663(core.List<api.Resource> o) { |
+checkUnnamed2363(core.List<api.Resource> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkResource(o[0]); |
checkResource(o[1]); |
@@ -450,7 +577,7 @@ buildResourcesListResponse() { |
buildCounterResourcesListResponse++; |
if (buildCounterResourcesListResponse < 3) { |
o.nextPageToken = "foo"; |
- o.resources = buildUnnamed1663(); |
+ o.resources = buildUnnamed2363(); |
} |
buildCounterResourcesListResponse--; |
return o; |
@@ -460,11 +587,45 @@ checkResourcesListResponse(api.ResourcesListResponse o) { |
buildCounterResourcesListResponse++; |
if (buildCounterResourcesListResponse < 3) { |
unittest.expect(o.nextPageToken, unittest.equals('foo')); |
- checkUnnamed1663(o.resources); |
+ checkUnnamed2363(o.resources); |
} |
buildCounterResourcesListResponse--; |
} |
+buildUnnamed2364() { |
+ var o = new core.List<api.ImportFile>(); |
+ o.add(buildImportFile()); |
+ o.add(buildImportFile()); |
+ return o; |
+} |
+ |
+checkUnnamed2364(core.List<api.ImportFile> o) { |
+ unittest.expect(o, unittest.hasLength(2)); |
+ checkImportFile(o[0]); |
+ checkImportFile(o[1]); |
+} |
+ |
+core.int buildCounterTargetConfiguration = 0; |
+buildTargetConfiguration() { |
+ var o = new api.TargetConfiguration(); |
+ buildCounterTargetConfiguration++; |
+ if (buildCounterTargetConfiguration < 3) { |
+ o.config = "foo"; |
+ o.imports = buildUnnamed2364(); |
+ } |
+ buildCounterTargetConfiguration--; |
+ return o; |
+} |
+ |
+checkTargetConfiguration(api.TargetConfiguration o) { |
+ buildCounterTargetConfiguration++; |
+ if (buildCounterTargetConfiguration < 3) { |
+ unittest.expect(o.config, unittest.equals('foo')); |
+ checkUnnamed2364(o.imports); |
+ } |
+ buildCounterTargetConfiguration--; |
+} |
+ |
core.int buildCounterType = 0; |
buildType() { |
var o = new api.Type(); |
@@ -484,14 +645,14 @@ checkType(api.Type o) { |
buildCounterType--; |
} |
-buildUnnamed1664() { |
+buildUnnamed2365() { |
var o = new core.List<api.Type>(); |
o.add(buildType()); |
o.add(buildType()); |
return o; |
} |
-checkUnnamed1664(core.List<api.Type> o) { |
+checkUnnamed2365(core.List<api.Type> o) { |
unittest.expect(o, unittest.hasLength(2)); |
checkType(o[0]); |
checkType(o[1]); |
@@ -502,7 +663,8 @@ buildTypesListResponse() { |
var o = new api.TypesListResponse(); |
buildCounterTypesListResponse++; |
if (buildCounterTypesListResponse < 3) { |
- o.types = buildUnnamed1664(); |
+ o.nextPageToken = "foo"; |
+ o.types = buildUnnamed2365(); |
} |
buildCounterTypesListResponse--; |
return o; |
@@ -511,7 +673,8 @@ buildTypesListResponse() { |
checkTypesListResponse(api.TypesListResponse o) { |
buildCounterTypesListResponse++; |
if (buildCounterTypesListResponse < 3) { |
- checkUnnamed1664(o.types); |
+ unittest.expect(o.nextPageToken, unittest.equals('foo')); |
+ checkUnnamed2365(o.types); |
} |
buildCounterTypesListResponse--; |
} |
@@ -527,6 +690,15 @@ main() { |
}); |
+ unittest.group("obj-schema-DeploymentUpdate", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildDeploymentUpdate(); |
+ var od = new api.DeploymentUpdate.fromJson(o.toJson()); |
+ checkDeploymentUpdate(od); |
+ }); |
+ }); |
+ |
+ |
unittest.group("obj-schema-DeploymentsListResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildDeploymentsListResponse(); |
@@ -536,6 +708,15 @@ main() { |
}); |
+ unittest.group("obj-schema-ImportFile", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildImportFile(); |
+ var od = new api.ImportFile.fromJson(o.toJson()); |
+ checkImportFile(od); |
+ }); |
+ }); |
+ |
+ |
unittest.group("obj-schema-Manifest", () { |
unittest.test("to-json--from-json", () { |
var o = buildManifest(); |
@@ -617,6 +798,15 @@ main() { |
}); |
+ unittest.group("obj-schema-ResourceUpdate", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildResourceUpdate(); |
+ var od = new api.ResourceUpdate.fromJson(o.toJson()); |
+ checkResourceUpdate(od); |
+ }); |
+ }); |
+ |
+ |
unittest.group("obj-schema-ResourcesListResponse", () { |
unittest.test("to-json--from-json", () { |
var o = buildResourcesListResponse(); |
@@ -626,6 +816,15 @@ main() { |
}); |
+ unittest.group("obj-schema-TargetConfiguration", () { |
+ unittest.test("to-json--from-json", () { |
+ var o = buildTargetConfiguration(); |
+ var od = new api.TargetConfiguration.fromJson(o.toJson()); |
+ checkTargetConfiguration(od); |
+ }); |
+ }); |
+ |
+ |
unittest.group("obj-schema-Type", () { |
unittest.test("to-json--from-json", () { |
var o = buildType(); |
@@ -782,6 +981,7 @@ main() { |
var mock = new HttpServerMock(); |
api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deployments; |
var arg_project = "foo"; |
+ var arg_filter = "foo"; |
var arg_maxResults = 42; |
var arg_pageToken = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -808,6 +1008,7 @@ main() { |
addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
+ unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.equals(arg_maxResults)); |
unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
@@ -818,11 +1019,117 @@ main() { |
var resp = convert.JSON.encode(buildDeploymentsListResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.DeploymentsListResponse response) { |
+ res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.DeploymentsListResponse response) { |
checkDeploymentsListResponse(response); |
}))); |
}); |
+ unittest.test("method--patch", () { |
+ |
+ var mock = new HttpServerMock(); |
+ api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deployments; |
+ var arg_request = buildDeployment(); |
+ var arg_project = "foo"; |
+ var arg_deployment = "foo"; |
+ var arg_createPolicy = "foo"; |
+ var arg_deletePolicy = "foo"; |
+ var arg_updatePolicy = "foo"; |
+ mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
+ var obj = new api.Deployment.fromJson(json); |
+ checkDeployment(obj); |
+ |
+ var path = (req.url).path; |
+ var pathOffset = 0; |
+ var index; |
+ var subPart; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ pathOffset += 1; |
+ |
+ 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])); |
+ } |
+ } |
+ unittest.expect(queryMap["createPolicy"].first, unittest.equals(arg_createPolicy)); |
+ unittest.expect(queryMap["deletePolicy"].first, unittest.equals(arg_deletePolicy)); |
+ unittest.expect(queryMap["updatePolicy"].first, unittest.equals(arg_updatePolicy)); |
+ |
+ |
+ var h = { |
+ "content-type" : "application/json; charset=utf-8", |
+ }; |
+ var resp = convert.JSON.encode(buildOperation()); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
+ }), true); |
+ res.patch(arg_request, arg_project, arg_deployment, createPolicy: arg_createPolicy, deletePolicy: arg_deletePolicy, updatePolicy: arg_updatePolicy).then(unittest.expectAsync(((api.Operation response) { |
+ checkOperation(response); |
+ }))); |
+ }); |
+ |
+ unittest.test("method--update", () { |
+ |
+ var mock = new HttpServerMock(); |
+ api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deployments; |
+ var arg_request = buildDeployment(); |
+ var arg_project = "foo"; |
+ var arg_deployment = "foo"; |
+ var arg_createPolicy = "foo"; |
+ var arg_deletePolicy = "foo"; |
+ var arg_updatePolicy = "foo"; |
+ mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
+ var obj = new api.Deployment.fromJson(json); |
+ checkDeployment(obj); |
+ |
+ var path = (req.url).path; |
+ var pathOffset = 0; |
+ var index; |
+ var subPart; |
+ unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
+ pathOffset += 1; |
+ |
+ 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])); |
+ } |
+ } |
+ unittest.expect(queryMap["createPolicy"].first, unittest.equals(arg_createPolicy)); |
+ unittest.expect(queryMap["deletePolicy"].first, unittest.equals(arg_deletePolicy)); |
+ unittest.expect(queryMap["updatePolicy"].first, unittest.equals(arg_updatePolicy)); |
+ |
+ |
+ var h = { |
+ "content-type" : "application/json; charset=utf-8", |
+ }; |
+ var resp = convert.JSON.encode(buildOperation()); |
+ return new async.Future.value(stringResponse(200, h, resp)); |
+ }), true); |
+ res.update(arg_request, arg_project, arg_deployment, createPolicy: arg_createPolicy, deletePolicy: arg_deletePolicy, updatePolicy: arg_updatePolicy).then(unittest.expectAsync(((api.Operation response) { |
+ checkOperation(response); |
+ }))); |
+ }); |
+ |
}); |
@@ -877,6 +1184,7 @@ main() { |
api.ManifestsResourceApi res = new api.DeploymentmanagerApi(mock).manifests; |
var arg_project = "foo"; |
var arg_deployment = "foo"; |
+ var arg_filter = "foo"; |
var arg_maxResults = 42; |
var arg_pageToken = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -903,6 +1211,7 @@ main() { |
addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
+ unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.equals(arg_maxResults)); |
unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
@@ -913,7 +1222,7 @@ main() { |
var resp = convert.JSON.encode(buildManifestsListResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_project, arg_deployment, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ManifestsListResponse response) { |
+ res.list(arg_project, arg_deployment, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ManifestsListResponse response) { |
checkManifestsListResponse(response); |
}))); |
}); |
@@ -970,6 +1279,7 @@ main() { |
var mock = new HttpServerMock(); |
api.OperationsResourceApi res = new api.DeploymentmanagerApi(mock).operations; |
var arg_project = "foo"; |
+ var arg_filter = "foo"; |
var arg_maxResults = 42; |
var arg_pageToken = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -996,6 +1306,7 @@ main() { |
addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
+ unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.equals(arg_maxResults)); |
unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
@@ -1006,7 +1317,7 @@ main() { |
var resp = convert.JSON.encode(buildOperationsListResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response) { |
+ res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response) { |
checkOperationsListResponse(response); |
}))); |
}); |
@@ -1065,6 +1376,7 @@ main() { |
api.ResourcesResourceApi res = new api.DeploymentmanagerApi(mock).resources; |
var arg_project = "foo"; |
var arg_deployment = "foo"; |
+ var arg_filter = "foo"; |
var arg_maxResults = 42; |
var arg_pageToken = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1091,6 +1403,7 @@ main() { |
addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
+ unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.equals(arg_maxResults)); |
unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
@@ -1101,7 +1414,7 @@ main() { |
var resp = convert.JSON.encode(buildResourcesListResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_project, arg_deployment, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ResourcesListResponse response) { |
+ res.list(arg_project, arg_deployment, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ResourcesListResponse response) { |
checkResourcesListResponse(response); |
}))); |
}); |
@@ -1115,6 +1428,7 @@ main() { |
var mock = new HttpServerMock(); |
api.TypesResourceApi res = new api.DeploymentmanagerApi(mock).types; |
var arg_project = "foo"; |
+ var arg_filter = "foo"; |
var arg_maxResults = 42; |
var arg_pageToken = "foo"; |
mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
@@ -1141,6 +1455,7 @@ main() { |
addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.decodeQueryComponent(keyvalue[1])); |
} |
} |
+ unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.equals(arg_maxResults)); |
unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
@@ -1151,7 +1466,7 @@ main() { |
var resp = convert.JSON.encode(buildTypesListResponse()); |
return new async.Future.value(stringResponse(200, h, resp)); |
}), true); |
- res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.TypesListResponse response) { |
+ res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.TypesListResponse response) { |
checkTypesListResponse(response); |
}))); |
}); |