| // Copyright 2018 Google LLC |
| // |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file or at |
| // https://developers.google.com/open-source/licenses/bsd |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: deprecated_member_use_from_same_package |
| // ignore_for_file: doc_directive_unknown |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_const_declarations |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_final_locals |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unintended_html_in_doc_comment |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_string_interpolations |
| // ignore_for_file: unreachable_from_main |
| // ignore_for_file: unused_local_variable |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:googleapis/jobs/v3.dart' as api; |
| import 'package:http/http.dart' as http; |
| import 'package:test/test.dart' as unittest; |
| |
| import '../test_shared.dart'; |
| |
| core.List<core.String> buildUnnamed0() => ['foo', 'foo']; |
| |
| void checkUnnamed0(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.List<core.String> buildUnnamed1() => ['foo', 'foo']; |
| |
| void checkUnnamed1(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 buildCounterApplicationInfo = 0; |
| api.ApplicationInfo buildApplicationInfo() { |
| final o = api.ApplicationInfo(); |
| buildCounterApplicationInfo++; |
| if (buildCounterApplicationInfo < 3) { |
| o.emails = buildUnnamed0(); |
| o.instruction = 'foo'; |
| o.uris = buildUnnamed1(); |
| } |
| buildCounterApplicationInfo--; |
| return o; |
| } |
| |
| void checkApplicationInfo(api.ApplicationInfo o) { |
| buildCounterApplicationInfo++; |
| if (buildCounterApplicationInfo < 3) { |
| checkUnnamed0(o.emails!); |
| unittest.expect(o.instruction!, unittest.equals('foo')); |
| checkUnnamed1(o.uris!); |
| } |
| buildCounterApplicationInfo--; |
| } |
| |
| core.int buildCounterBatchDeleteJobsRequest = 0; |
| api.BatchDeleteJobsRequest buildBatchDeleteJobsRequest() { |
| final o = api.BatchDeleteJobsRequest(); |
| buildCounterBatchDeleteJobsRequest++; |
| if (buildCounterBatchDeleteJobsRequest < 3) { |
| o.filter = 'foo'; |
| } |
| buildCounterBatchDeleteJobsRequest--; |
| return o; |
| } |
| |
| void checkBatchDeleteJobsRequest(api.BatchDeleteJobsRequest o) { |
| buildCounterBatchDeleteJobsRequest++; |
| if (buildCounterBatchDeleteJobsRequest < 3) { |
| unittest.expect(o.filter!, unittest.equals('foo')); |
| } |
| buildCounterBatchDeleteJobsRequest--; |
| } |
| |
| core.int buildCounterBucketRange = 0; |
| api.BucketRange buildBucketRange() { |
| final o = api.BucketRange(); |
| buildCounterBucketRange++; |
| if (buildCounterBucketRange < 3) { |
| o.from = 42.0; |
| o.to = 42.0; |
| } |
| buildCounterBucketRange--; |
| return o; |
| } |
| |
| void checkBucketRange(api.BucketRange o) { |
| buildCounterBucketRange++; |
| if (buildCounterBucketRange < 3) { |
| unittest.expect(o.from!, unittest.equals(42.0)); |
| unittest.expect(o.to!, unittest.equals(42.0)); |
| } |
| buildCounterBucketRange--; |
| } |
| |
| core.int buildCounterBucketizedCount = 0; |
| api.BucketizedCount buildBucketizedCount() { |
| final o = api.BucketizedCount(); |
| buildCounterBucketizedCount++; |
| if (buildCounterBucketizedCount < 3) { |
| o.count = 42; |
| o.range = buildBucketRange(); |
| } |
| buildCounterBucketizedCount--; |
| return o; |
| } |
| |
| void checkBucketizedCount(api.BucketizedCount o) { |
| buildCounterBucketizedCount++; |
| if (buildCounterBucketizedCount < 3) { |
| unittest.expect(o.count!, unittest.equals(42)); |
| checkBucketRange(o.range!); |
| } |
| buildCounterBucketizedCount--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed2() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed2(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterClientEvent = 0; |
| api.ClientEvent buildClientEvent() { |
| final o = api.ClientEvent(); |
| buildCounterClientEvent++; |
| if (buildCounterClientEvent < 3) { |
| o.createTime = 'foo'; |
| o.eventId = 'foo'; |
| o.extraInfo = buildUnnamed2(); |
| o.jobEvent = buildJobEvent(); |
| o.parentEventId = 'foo'; |
| o.requestId = 'foo'; |
| } |
| buildCounterClientEvent--; |
| return o; |
| } |
| |
| void checkClientEvent(api.ClientEvent o) { |
| buildCounterClientEvent++; |
| if (buildCounterClientEvent < 3) { |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.eventId!, unittest.equals('foo')); |
| checkUnnamed2(o.extraInfo!); |
| checkJobEvent(o.jobEvent!); |
| unittest.expect(o.parentEventId!, unittest.equals('foo')); |
| unittest.expect(o.requestId!, unittest.equals('foo')); |
| } |
| buildCounterClientEvent--; |
| } |
| |
| core.int buildCounterCommuteFilter = 0; |
| api.CommuteFilter buildCommuteFilter() { |
| final o = api.CommuteFilter(); |
| buildCounterCommuteFilter++; |
| if (buildCounterCommuteFilter < 3) { |
| o.allowImpreciseAddresses = true; |
| o.commuteMethod = 'foo'; |
| o.departureTime = buildTimeOfDay(); |
| o.roadTraffic = 'foo'; |
| o.startCoordinates = buildLatLng(); |
| o.travelDuration = 'foo'; |
| } |
| buildCounterCommuteFilter--; |
| return o; |
| } |
| |
| void checkCommuteFilter(api.CommuteFilter o) { |
| buildCounterCommuteFilter++; |
| if (buildCounterCommuteFilter < 3) { |
| unittest.expect(o.allowImpreciseAddresses!, unittest.isTrue); |
| unittest.expect(o.commuteMethod!, unittest.equals('foo')); |
| checkTimeOfDay(o.departureTime!); |
| unittest.expect(o.roadTraffic!, unittest.equals('foo')); |
| checkLatLng(o.startCoordinates!); |
| unittest.expect(o.travelDuration!, unittest.equals('foo')); |
| } |
| buildCounterCommuteFilter--; |
| } |
| |
| core.int buildCounterCommuteInfo = 0; |
| api.CommuteInfo buildCommuteInfo() { |
| final o = api.CommuteInfo(); |
| buildCounterCommuteInfo++; |
| if (buildCounterCommuteInfo < 3) { |
| o.jobLocation = buildLocation(); |
| o.travelDuration = 'foo'; |
| } |
| buildCounterCommuteInfo--; |
| return o; |
| } |
| |
| void checkCommuteInfo(api.CommuteInfo o) { |
| buildCounterCommuteInfo++; |
| if (buildCounterCommuteInfo < 3) { |
| checkLocation(o.jobLocation!); |
| unittest.expect(o.travelDuration!, unittest.equals('foo')); |
| } |
| buildCounterCommuteInfo--; |
| } |
| |
| core.List<core.String> buildUnnamed3() => ['foo', 'foo']; |
| |
| void checkUnnamed3(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 buildCounterCompany = 0; |
| api.Company buildCompany() { |
| final o = api.Company(); |
| buildCounterCompany++; |
| if (buildCounterCompany < 3) { |
| o.careerSiteUri = 'foo'; |
| o.derivedInfo = buildCompanyDerivedInfo(); |
| o.displayName = 'foo'; |
| o.eeoText = 'foo'; |
| o.externalId = 'foo'; |
| o.headquartersAddress = 'foo'; |
| o.hiringAgency = true; |
| o.imageUri = 'foo'; |
| o.keywordSearchableJobCustomAttributes = buildUnnamed3(); |
| o.name = 'foo'; |
| o.size = 'foo'; |
| o.suspended = true; |
| o.websiteUri = 'foo'; |
| } |
| buildCounterCompany--; |
| return o; |
| } |
| |
| void checkCompany(api.Company o) { |
| buildCounterCompany++; |
| if (buildCounterCompany < 3) { |
| unittest.expect(o.careerSiteUri!, unittest.equals('foo')); |
| checkCompanyDerivedInfo(o.derivedInfo!); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.eeoText!, unittest.equals('foo')); |
| unittest.expect(o.externalId!, unittest.equals('foo')); |
| unittest.expect(o.headquartersAddress!, unittest.equals('foo')); |
| unittest.expect(o.hiringAgency!, unittest.isTrue); |
| unittest.expect(o.imageUri!, unittest.equals('foo')); |
| checkUnnamed3(o.keywordSearchableJobCustomAttributes!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.size!, unittest.equals('foo')); |
| unittest.expect(o.suspended!, unittest.isTrue); |
| unittest.expect(o.websiteUri!, unittest.equals('foo')); |
| } |
| buildCounterCompany--; |
| } |
| |
| core.int buildCounterCompanyDerivedInfo = 0; |
| api.CompanyDerivedInfo buildCompanyDerivedInfo() { |
| final o = api.CompanyDerivedInfo(); |
| buildCounterCompanyDerivedInfo++; |
| if (buildCounterCompanyDerivedInfo < 3) { |
| o.headquartersLocation = buildLocation(); |
| } |
| buildCounterCompanyDerivedInfo--; |
| return o; |
| } |
| |
| void checkCompanyDerivedInfo(api.CompanyDerivedInfo o) { |
| buildCounterCompanyDerivedInfo++; |
| if (buildCounterCompanyDerivedInfo < 3) { |
| checkLocation(o.headquartersLocation!); |
| } |
| buildCounterCompanyDerivedInfo--; |
| } |
| |
| core.int buildCounterCompensationEntry = 0; |
| api.CompensationEntry buildCompensationEntry() { |
| final o = api.CompensationEntry(); |
| buildCounterCompensationEntry++; |
| if (buildCounterCompensationEntry < 3) { |
| o.amount = buildMoney(); |
| o.description = 'foo'; |
| o.expectedUnitsPerYear = 42.0; |
| o.range = buildCompensationRange(); |
| o.type = 'foo'; |
| o.unit = 'foo'; |
| } |
| buildCounterCompensationEntry--; |
| return o; |
| } |
| |
| void checkCompensationEntry(api.CompensationEntry o) { |
| buildCounterCompensationEntry++; |
| if (buildCounterCompensationEntry < 3) { |
| checkMoney(o.amount!); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.expectedUnitsPerYear!, unittest.equals(42.0)); |
| checkCompensationRange(o.range!); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| unittest.expect(o.unit!, unittest.equals('foo')); |
| } |
| buildCounterCompensationEntry--; |
| } |
| |
| core.List<core.String> buildUnnamed4() => ['foo', 'foo']; |
| |
| void checkUnnamed4(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 buildCounterCompensationFilter = 0; |
| api.CompensationFilter buildCompensationFilter() { |
| final o = api.CompensationFilter(); |
| buildCounterCompensationFilter++; |
| if (buildCounterCompensationFilter < 3) { |
| o.includeJobsWithUnspecifiedCompensationRange = true; |
| o.range = buildCompensationRange(); |
| o.type = 'foo'; |
| o.units = buildUnnamed4(); |
| } |
| buildCounterCompensationFilter--; |
| return o; |
| } |
| |
| void checkCompensationFilter(api.CompensationFilter o) { |
| buildCounterCompensationFilter++; |
| if (buildCounterCompensationFilter < 3) { |
| unittest.expect( |
| o.includeJobsWithUnspecifiedCompensationRange!, |
| unittest.isTrue, |
| ); |
| checkCompensationRange(o.range!); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| checkUnnamed4(o.units!); |
| } |
| buildCounterCompensationFilter--; |
| } |
| |
| core.int buildCounterCompensationHistogramRequest = 0; |
| api.CompensationHistogramRequest buildCompensationHistogramRequest() { |
| final o = api.CompensationHistogramRequest(); |
| buildCounterCompensationHistogramRequest++; |
| if (buildCounterCompensationHistogramRequest < 3) { |
| o.bucketingOption = buildNumericBucketingOption(); |
| o.type = 'foo'; |
| } |
| buildCounterCompensationHistogramRequest--; |
| return o; |
| } |
| |
| void checkCompensationHistogramRequest(api.CompensationHistogramRequest o) { |
| buildCounterCompensationHistogramRequest++; |
| if (buildCounterCompensationHistogramRequest < 3) { |
| checkNumericBucketingOption(o.bucketingOption!); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterCompensationHistogramRequest--; |
| } |
| |
| core.int buildCounterCompensationHistogramResult = 0; |
| api.CompensationHistogramResult buildCompensationHistogramResult() { |
| final o = api.CompensationHistogramResult(); |
| buildCounterCompensationHistogramResult++; |
| if (buildCounterCompensationHistogramResult < 3) { |
| o.result = buildNumericBucketingResult(); |
| o.type = 'foo'; |
| } |
| buildCounterCompensationHistogramResult--; |
| return o; |
| } |
| |
| void checkCompensationHistogramResult(api.CompensationHistogramResult o) { |
| buildCounterCompensationHistogramResult++; |
| if (buildCounterCompensationHistogramResult < 3) { |
| checkNumericBucketingResult(o.result!); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterCompensationHistogramResult--; |
| } |
| |
| core.List<api.CompensationEntry> buildUnnamed5() => [ |
| buildCompensationEntry(), |
| buildCompensationEntry(), |
| ]; |
| |
| void checkUnnamed5(core.List<api.CompensationEntry> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCompensationEntry(o[0]); |
| checkCompensationEntry(o[1]); |
| } |
| |
| core.int buildCounterCompensationInfo = 0; |
| api.CompensationInfo buildCompensationInfo() { |
| final o = api.CompensationInfo(); |
| buildCounterCompensationInfo++; |
| if (buildCounterCompensationInfo < 3) { |
| o.annualizedBaseCompensationRange = buildCompensationRange(); |
| o.annualizedTotalCompensationRange = buildCompensationRange(); |
| o.entries = buildUnnamed5(); |
| } |
| buildCounterCompensationInfo--; |
| return o; |
| } |
| |
| void checkCompensationInfo(api.CompensationInfo o) { |
| buildCounterCompensationInfo++; |
| if (buildCounterCompensationInfo < 3) { |
| checkCompensationRange(o.annualizedBaseCompensationRange!); |
| checkCompensationRange(o.annualizedTotalCompensationRange!); |
| checkUnnamed5(o.entries!); |
| } |
| buildCounterCompensationInfo--; |
| } |
| |
| core.int buildCounterCompensationRange = 0; |
| api.CompensationRange buildCompensationRange() { |
| final o = api.CompensationRange(); |
| buildCounterCompensationRange++; |
| if (buildCounterCompensationRange < 3) { |
| o.maxCompensation = buildMoney(); |
| o.minCompensation = buildMoney(); |
| } |
| buildCounterCompensationRange--; |
| return o; |
| } |
| |
| void checkCompensationRange(api.CompensationRange o) { |
| buildCounterCompensationRange++; |
| if (buildCounterCompensationRange < 3) { |
| checkMoney(o.maxCompensation!); |
| checkMoney(o.minCompensation!); |
| } |
| buildCounterCompensationRange--; |
| } |
| |
| core.List<api.CompletionResult> buildUnnamed6() => [ |
| buildCompletionResult(), |
| buildCompletionResult(), |
| ]; |
| |
| void checkUnnamed6(core.List<api.CompletionResult> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCompletionResult(o[0]); |
| checkCompletionResult(o[1]); |
| } |
| |
| core.int buildCounterCompleteQueryResponse = 0; |
| api.CompleteQueryResponse buildCompleteQueryResponse() { |
| final o = api.CompleteQueryResponse(); |
| buildCounterCompleteQueryResponse++; |
| if (buildCounterCompleteQueryResponse < 3) { |
| o.completionResults = buildUnnamed6(); |
| o.metadata = buildResponseMetadata(); |
| } |
| buildCounterCompleteQueryResponse--; |
| return o; |
| } |
| |
| void checkCompleteQueryResponse(api.CompleteQueryResponse o) { |
| buildCounterCompleteQueryResponse++; |
| if (buildCounterCompleteQueryResponse < 3) { |
| checkUnnamed6(o.completionResults!); |
| checkResponseMetadata(o.metadata!); |
| } |
| buildCounterCompleteQueryResponse--; |
| } |
| |
| core.int buildCounterCompletionResult = 0; |
| api.CompletionResult buildCompletionResult() { |
| final o = api.CompletionResult(); |
| buildCounterCompletionResult++; |
| if (buildCounterCompletionResult < 3) { |
| o.imageUri = 'foo'; |
| o.suggestion = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterCompletionResult--; |
| return o; |
| } |
| |
| void checkCompletionResult(api.CompletionResult o) { |
| buildCounterCompletionResult++; |
| if (buildCounterCompletionResult < 3) { |
| unittest.expect(o.imageUri!, unittest.equals('foo')); |
| unittest.expect(o.suggestion!, unittest.equals('foo')); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterCompletionResult--; |
| } |
| |
| core.int buildCounterCreateClientEventRequest = 0; |
| api.CreateClientEventRequest buildCreateClientEventRequest() { |
| final o = api.CreateClientEventRequest(); |
| buildCounterCreateClientEventRequest++; |
| if (buildCounterCreateClientEventRequest < 3) { |
| o.clientEvent = buildClientEvent(); |
| } |
| buildCounterCreateClientEventRequest--; |
| return o; |
| } |
| |
| void checkCreateClientEventRequest(api.CreateClientEventRequest o) { |
| buildCounterCreateClientEventRequest++; |
| if (buildCounterCreateClientEventRequest < 3) { |
| checkClientEvent(o.clientEvent!); |
| } |
| buildCounterCreateClientEventRequest--; |
| } |
| |
| core.int buildCounterCreateCompanyRequest = 0; |
| api.CreateCompanyRequest buildCreateCompanyRequest() { |
| final o = api.CreateCompanyRequest(); |
| buildCounterCreateCompanyRequest++; |
| if (buildCounterCreateCompanyRequest < 3) { |
| o.company = buildCompany(); |
| } |
| buildCounterCreateCompanyRequest--; |
| return o; |
| } |
| |
| void checkCreateCompanyRequest(api.CreateCompanyRequest o) { |
| buildCounterCreateCompanyRequest++; |
| if (buildCounterCreateCompanyRequest < 3) { |
| checkCompany(o.company!); |
| } |
| buildCounterCreateCompanyRequest--; |
| } |
| |
| core.int buildCounterCreateJobRequest = 0; |
| api.CreateJobRequest buildCreateJobRequest() { |
| final o = api.CreateJobRequest(); |
| buildCounterCreateJobRequest++; |
| if (buildCounterCreateJobRequest < 3) { |
| o.job = buildJob(); |
| } |
| buildCounterCreateJobRequest--; |
| return o; |
| } |
| |
| void checkCreateJobRequest(api.CreateJobRequest o) { |
| buildCounterCreateJobRequest++; |
| if (buildCounterCreateJobRequest < 3) { |
| checkJob(o.job!); |
| } |
| buildCounterCreateJobRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed7() => ['foo', 'foo']; |
| |
| void checkUnnamed7(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.List<core.String> buildUnnamed8() => ['foo', 'foo']; |
| |
| void checkUnnamed8(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 buildCounterCustomAttribute = 0; |
| api.CustomAttribute buildCustomAttribute() { |
| final o = api.CustomAttribute(); |
| buildCounterCustomAttribute++; |
| if (buildCounterCustomAttribute < 3) { |
| o.filterable = true; |
| o.longValues = buildUnnamed7(); |
| o.stringValues = buildUnnamed8(); |
| } |
| buildCounterCustomAttribute--; |
| return o; |
| } |
| |
| void checkCustomAttribute(api.CustomAttribute o) { |
| buildCounterCustomAttribute++; |
| if (buildCounterCustomAttribute < 3) { |
| unittest.expect(o.filterable!, unittest.isTrue); |
| checkUnnamed7(o.longValues!); |
| checkUnnamed8(o.stringValues!); |
| } |
| buildCounterCustomAttribute--; |
| } |
| |
| core.int buildCounterCustomAttributeHistogramRequest = 0; |
| api.CustomAttributeHistogramRequest buildCustomAttributeHistogramRequest() { |
| final o = api.CustomAttributeHistogramRequest(); |
| buildCounterCustomAttributeHistogramRequest++; |
| if (buildCounterCustomAttributeHistogramRequest < 3) { |
| o.key = 'foo'; |
| o.longValueHistogramBucketingOption = buildNumericBucketingOption(); |
| o.stringValueHistogram = true; |
| } |
| buildCounterCustomAttributeHistogramRequest--; |
| return o; |
| } |
| |
| void checkCustomAttributeHistogramRequest( |
| api.CustomAttributeHistogramRequest o, |
| ) { |
| buildCounterCustomAttributeHistogramRequest++; |
| if (buildCounterCustomAttributeHistogramRequest < 3) { |
| unittest.expect(o.key!, unittest.equals('foo')); |
| checkNumericBucketingOption(o.longValueHistogramBucketingOption!); |
| unittest.expect(o.stringValueHistogram!, unittest.isTrue); |
| } |
| buildCounterCustomAttributeHistogramRequest--; |
| } |
| |
| core.Map<core.String, core.int> buildUnnamed9() => {'x': 42, 'y': 42}; |
| |
| void checkUnnamed9(core.Map<core.String, core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals(42)); |
| unittest.expect(o['y']!, unittest.equals(42)); |
| } |
| |
| core.int buildCounterCustomAttributeHistogramResult = 0; |
| api.CustomAttributeHistogramResult buildCustomAttributeHistogramResult() { |
| final o = api.CustomAttributeHistogramResult(); |
| buildCounterCustomAttributeHistogramResult++; |
| if (buildCounterCustomAttributeHistogramResult < 3) { |
| o.key = 'foo'; |
| o.longValueHistogramResult = buildNumericBucketingResult(); |
| o.stringValueHistogramResult = buildUnnamed9(); |
| } |
| buildCounterCustomAttributeHistogramResult--; |
| return o; |
| } |
| |
| void checkCustomAttributeHistogramResult(api.CustomAttributeHistogramResult o) { |
| buildCounterCustomAttributeHistogramResult++; |
| if (buildCounterCustomAttributeHistogramResult < 3) { |
| unittest.expect(o.key!, unittest.equals('foo')); |
| checkNumericBucketingResult(o.longValueHistogramResult!); |
| checkUnnamed9(o.stringValueHistogramResult!); |
| } |
| buildCounterCustomAttributeHistogramResult--; |
| } |
| |
| core.int buildCounterDeviceInfo = 0; |
| api.DeviceInfo buildDeviceInfo() { |
| final o = api.DeviceInfo(); |
| buildCounterDeviceInfo++; |
| if (buildCounterDeviceInfo < 3) { |
| o.deviceType = 'foo'; |
| o.id = 'foo'; |
| } |
| buildCounterDeviceInfo--; |
| return o; |
| } |
| |
| void checkDeviceInfo(api.DeviceInfo o) { |
| buildCounterDeviceInfo++; |
| if (buildCounterDeviceInfo < 3) { |
| unittest.expect(o.deviceType!, unittest.equals('foo')); |
| unittest.expect(o.id!, unittest.equals('foo')); |
| } |
| buildCounterDeviceInfo--; |
| } |
| |
| core.int buildCounterEmpty = 0; |
| api.Empty buildEmpty() { |
| final o = api.Empty(); |
| buildCounterEmpty++; |
| if (buildCounterEmpty < 3) {} |
| buildCounterEmpty--; |
| return o; |
| } |
| |
| void checkEmpty(api.Empty o) { |
| buildCounterEmpty++; |
| if (buildCounterEmpty < 3) {} |
| buildCounterEmpty--; |
| } |
| |
| core.List<api.CompensationHistogramRequest> buildUnnamed10() => [ |
| buildCompensationHistogramRequest(), |
| buildCompensationHistogramRequest(), |
| ]; |
| |
| void checkUnnamed10(core.List<api.CompensationHistogramRequest> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCompensationHistogramRequest(o[0]); |
| checkCompensationHistogramRequest(o[1]); |
| } |
| |
| core.List<api.CustomAttributeHistogramRequest> buildUnnamed11() => [ |
| buildCustomAttributeHistogramRequest(), |
| buildCustomAttributeHistogramRequest(), |
| ]; |
| |
| void checkUnnamed11(core.List<api.CustomAttributeHistogramRequest> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomAttributeHistogramRequest(o[0]); |
| checkCustomAttributeHistogramRequest(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed12() => ['foo', 'foo']; |
| |
| void checkUnnamed12(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 buildCounterHistogramFacets = 0; |
| api.HistogramFacets buildHistogramFacets() { |
| final o = api.HistogramFacets(); |
| buildCounterHistogramFacets++; |
| if (buildCounterHistogramFacets < 3) { |
| o.compensationHistogramFacets = buildUnnamed10(); |
| o.customAttributeHistogramFacets = buildUnnamed11(); |
| o.simpleHistogramFacets = buildUnnamed12(); |
| } |
| buildCounterHistogramFacets--; |
| return o; |
| } |
| |
| void checkHistogramFacets(api.HistogramFacets o) { |
| buildCounterHistogramFacets++; |
| if (buildCounterHistogramFacets < 3) { |
| checkUnnamed10(o.compensationHistogramFacets!); |
| checkUnnamed11(o.customAttributeHistogramFacets!); |
| checkUnnamed12(o.simpleHistogramFacets!); |
| } |
| buildCounterHistogramFacets--; |
| } |
| |
| core.Map<core.String, core.int> buildUnnamed13() => {'x': 42, 'y': 42}; |
| |
| void checkUnnamed13(core.Map<core.String, core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals(42)); |
| unittest.expect(o['y']!, unittest.equals(42)); |
| } |
| |
| core.int buildCounterHistogramResult = 0; |
| api.HistogramResult buildHistogramResult() { |
| final o = api.HistogramResult(); |
| buildCounterHistogramResult++; |
| if (buildCounterHistogramResult < 3) { |
| o.searchType = 'foo'; |
| o.values = buildUnnamed13(); |
| } |
| buildCounterHistogramResult--; |
| return o; |
| } |
| |
| void checkHistogramResult(api.HistogramResult o) { |
| buildCounterHistogramResult++; |
| if (buildCounterHistogramResult < 3) { |
| unittest.expect(o.searchType!, unittest.equals('foo')); |
| checkUnnamed13(o.values!); |
| } |
| buildCounterHistogramResult--; |
| } |
| |
| core.List<api.CompensationHistogramResult> buildUnnamed14() => [ |
| buildCompensationHistogramResult(), |
| buildCompensationHistogramResult(), |
| ]; |
| |
| void checkUnnamed14(core.List<api.CompensationHistogramResult> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCompensationHistogramResult(o[0]); |
| checkCompensationHistogramResult(o[1]); |
| } |
| |
| core.List<api.CustomAttributeHistogramResult> buildUnnamed15() => [ |
| buildCustomAttributeHistogramResult(), |
| buildCustomAttributeHistogramResult(), |
| ]; |
| |
| void checkUnnamed15(core.List<api.CustomAttributeHistogramResult> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomAttributeHistogramResult(o[0]); |
| checkCustomAttributeHistogramResult(o[1]); |
| } |
| |
| core.List<api.HistogramResult> buildUnnamed16() => [ |
| buildHistogramResult(), |
| buildHistogramResult(), |
| ]; |
| |
| void checkUnnamed16(core.List<api.HistogramResult> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkHistogramResult(o[0]); |
| checkHistogramResult(o[1]); |
| } |
| |
| core.int buildCounterHistogramResults = 0; |
| api.HistogramResults buildHistogramResults() { |
| final o = api.HistogramResults(); |
| buildCounterHistogramResults++; |
| if (buildCounterHistogramResults < 3) { |
| o.compensationHistogramResults = buildUnnamed14(); |
| o.customAttributeHistogramResults = buildUnnamed15(); |
| o.simpleHistogramResults = buildUnnamed16(); |
| } |
| buildCounterHistogramResults--; |
| return o; |
| } |
| |
| void checkHistogramResults(api.HistogramResults o) { |
| buildCounterHistogramResults++; |
| if (buildCounterHistogramResults < 3) { |
| checkUnnamed14(o.compensationHistogramResults!); |
| checkUnnamed15(o.customAttributeHistogramResults!); |
| checkUnnamed16(o.simpleHistogramResults!); |
| } |
| buildCounterHistogramResults--; |
| } |
| |
| core.List<core.String> buildUnnamed17() => ['foo', 'foo']; |
| |
| void checkUnnamed17(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.Map<core.String, api.CustomAttribute> buildUnnamed18() => { |
| 'x': buildCustomAttribute(), |
| 'y': buildCustomAttribute(), |
| }; |
| |
| void checkUnnamed18(core.Map<core.String, api.CustomAttribute> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCustomAttribute(o['x']!); |
| checkCustomAttribute(o['y']!); |
| } |
| |
| core.List<core.String> buildUnnamed19() => ['foo', 'foo']; |
| |
| void checkUnnamed19(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.List<core.String> buildUnnamed20() => ['foo', 'foo']; |
| |
| void checkUnnamed20(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.List<core.String> buildUnnamed21() => ['foo', 'foo']; |
| |
| void checkUnnamed21(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 buildCounterJob = 0; |
| api.Job buildJob() { |
| final o = api.Job(); |
| buildCounterJob++; |
| if (buildCounterJob < 3) { |
| o.addresses = buildUnnamed17(); |
| o.applicationInfo = buildApplicationInfo(); |
| o.companyDisplayName = 'foo'; |
| o.companyName = 'foo'; |
| o.compensationInfo = buildCompensationInfo(); |
| o.customAttributes = buildUnnamed18(); |
| o.degreeTypes = buildUnnamed19(); |
| o.department = 'foo'; |
| o.derivedInfo = buildJobDerivedInfo(); |
| o.description = 'foo'; |
| o.employmentTypes = buildUnnamed20(); |
| o.incentives = 'foo'; |
| o.jobBenefits = buildUnnamed21(); |
| o.jobEndTime = 'foo'; |
| o.jobLevel = 'foo'; |
| o.jobStartTime = 'foo'; |
| o.languageCode = 'foo'; |
| o.name = 'foo'; |
| o.postingCreateTime = 'foo'; |
| o.postingExpireTime = 'foo'; |
| o.postingPublishTime = 'foo'; |
| o.postingRegion = 'foo'; |
| o.postingUpdateTime = 'foo'; |
| o.processingOptions = buildProcessingOptions(); |
| o.promotionValue = 42; |
| o.qualifications = 'foo'; |
| o.requisitionId = 'foo'; |
| o.responsibilities = 'foo'; |
| o.title = 'foo'; |
| o.visibility = 'foo'; |
| } |
| buildCounterJob--; |
| return o; |
| } |
| |
| void checkJob(api.Job o) { |
| buildCounterJob++; |
| if (buildCounterJob < 3) { |
| checkUnnamed17(o.addresses!); |
| checkApplicationInfo(o.applicationInfo!); |
| unittest.expect(o.companyDisplayName!, unittest.equals('foo')); |
| unittest.expect(o.companyName!, unittest.equals('foo')); |
| checkCompensationInfo(o.compensationInfo!); |
| checkUnnamed18(o.customAttributes!); |
| checkUnnamed19(o.degreeTypes!); |
| unittest.expect(o.department!, unittest.equals('foo')); |
| checkJobDerivedInfo(o.derivedInfo!); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkUnnamed20(o.employmentTypes!); |
| unittest.expect(o.incentives!, unittest.equals('foo')); |
| checkUnnamed21(o.jobBenefits!); |
| unittest.expect(o.jobEndTime!, unittest.equals('foo')); |
| unittest.expect(o.jobLevel!, unittest.equals('foo')); |
| unittest.expect(o.jobStartTime!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.postingCreateTime!, unittest.equals('foo')); |
| unittest.expect(o.postingExpireTime!, unittest.equals('foo')); |
| unittest.expect(o.postingPublishTime!, unittest.equals('foo')); |
| unittest.expect(o.postingRegion!, unittest.equals('foo')); |
| unittest.expect(o.postingUpdateTime!, unittest.equals('foo')); |
| checkProcessingOptions(o.processingOptions!); |
| unittest.expect(o.promotionValue!, unittest.equals(42)); |
| unittest.expect(o.qualifications!, unittest.equals('foo')); |
| unittest.expect(o.requisitionId!, unittest.equals('foo')); |
| unittest.expect(o.responsibilities!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| unittest.expect(o.visibility!, unittest.equals('foo')); |
| } |
| buildCounterJob--; |
| } |
| |
| core.List<core.String> buildUnnamed22() => ['foo', 'foo']; |
| |
| void checkUnnamed22(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.List<api.Location> buildUnnamed23() => [buildLocation(), buildLocation()]; |
| |
| void checkUnnamed23(core.List<api.Location> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkLocation(o[0]); |
| checkLocation(o[1]); |
| } |
| |
| core.int buildCounterJobDerivedInfo = 0; |
| api.JobDerivedInfo buildJobDerivedInfo() { |
| final o = api.JobDerivedInfo(); |
| buildCounterJobDerivedInfo++; |
| if (buildCounterJobDerivedInfo < 3) { |
| o.jobCategories = buildUnnamed22(); |
| o.locations = buildUnnamed23(); |
| } |
| buildCounterJobDerivedInfo--; |
| return o; |
| } |
| |
| void checkJobDerivedInfo(api.JobDerivedInfo o) { |
| buildCounterJobDerivedInfo++; |
| if (buildCounterJobDerivedInfo < 3) { |
| checkUnnamed22(o.jobCategories!); |
| checkUnnamed23(o.locations!); |
| } |
| buildCounterJobDerivedInfo--; |
| } |
| |
| core.List<core.String> buildUnnamed24() => ['foo', 'foo']; |
| |
| void checkUnnamed24(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 buildCounterJobEvent = 0; |
| api.JobEvent buildJobEvent() { |
| final o = api.JobEvent(); |
| buildCounterJobEvent++; |
| if (buildCounterJobEvent < 3) { |
| o.jobs = buildUnnamed24(); |
| o.type = 'foo'; |
| } |
| buildCounterJobEvent--; |
| return o; |
| } |
| |
| void checkJobEvent(api.JobEvent o) { |
| buildCounterJobEvent++; |
| if (buildCounterJobEvent < 3) { |
| checkUnnamed24(o.jobs!); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterJobEvent--; |
| } |
| |
| core.List<core.String> buildUnnamed25() => ['foo', 'foo']; |
| |
| void checkUnnamed25(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.List<core.String> buildUnnamed26() => ['foo', 'foo']; |
| |
| void checkUnnamed26(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.List<core.String> buildUnnamed27() => ['foo', 'foo']; |
| |
| void checkUnnamed27(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.List<core.String> buildUnnamed28() => ['foo', 'foo']; |
| |
| void checkUnnamed28(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.List<core.String> buildUnnamed29() => ['foo', 'foo']; |
| |
| void checkUnnamed29(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.List<api.LocationFilter> buildUnnamed30() => [ |
| buildLocationFilter(), |
| buildLocationFilter(), |
| ]; |
| |
| void checkUnnamed30(core.List<api.LocationFilter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkLocationFilter(o[0]); |
| checkLocationFilter(o[1]); |
| } |
| |
| core.int buildCounterJobQuery = 0; |
| api.JobQuery buildJobQuery() { |
| final o = api.JobQuery(); |
| buildCounterJobQuery++; |
| if (buildCounterJobQuery < 3) { |
| o.commuteFilter = buildCommuteFilter(); |
| o.companyDisplayNames = buildUnnamed25(); |
| o.companyNames = buildUnnamed26(); |
| o.compensationFilter = buildCompensationFilter(); |
| o.customAttributeFilter = 'foo'; |
| o.disableSpellCheck = true; |
| o.employmentTypes = buildUnnamed27(); |
| o.jobCategories = buildUnnamed28(); |
| o.languageCodes = buildUnnamed29(); |
| o.locationFilters = buildUnnamed30(); |
| o.publishTimeRange = buildTimestampRange(); |
| o.query = 'foo'; |
| o.queryLanguageCode = 'foo'; |
| } |
| buildCounterJobQuery--; |
| return o; |
| } |
| |
| void checkJobQuery(api.JobQuery o) { |
| buildCounterJobQuery++; |
| if (buildCounterJobQuery < 3) { |
| checkCommuteFilter(o.commuteFilter!); |
| checkUnnamed25(o.companyDisplayNames!); |
| checkUnnamed26(o.companyNames!); |
| checkCompensationFilter(o.compensationFilter!); |
| unittest.expect(o.customAttributeFilter!, unittest.equals('foo')); |
| unittest.expect(o.disableSpellCheck!, unittest.isTrue); |
| checkUnnamed27(o.employmentTypes!); |
| checkUnnamed28(o.jobCategories!); |
| checkUnnamed29(o.languageCodes!); |
| checkUnnamed30(o.locationFilters!); |
| checkTimestampRange(o.publishTimeRange!); |
| unittest.expect(o.query!, unittest.equals('foo')); |
| unittest.expect(o.queryLanguageCode!, unittest.equals('foo')); |
| } |
| buildCounterJobQuery--; |
| } |
| |
| core.int buildCounterLatLng = 0; |
| api.LatLng buildLatLng() { |
| final o = api.LatLng(); |
| buildCounterLatLng++; |
| if (buildCounterLatLng < 3) { |
| o.latitude = 42.0; |
| o.longitude = 42.0; |
| } |
| buildCounterLatLng--; |
| return o; |
| } |
| |
| void checkLatLng(api.LatLng o) { |
| buildCounterLatLng++; |
| if (buildCounterLatLng < 3) { |
| unittest.expect(o.latitude!, unittest.equals(42.0)); |
| unittest.expect(o.longitude!, unittest.equals(42.0)); |
| } |
| buildCounterLatLng--; |
| } |
| |
| core.List<api.Company> buildUnnamed31() => [buildCompany(), buildCompany()]; |
| |
| void checkUnnamed31(core.List<api.Company> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkCompany(o[0]); |
| checkCompany(o[1]); |
| } |
| |
| core.int buildCounterListCompaniesResponse = 0; |
| api.ListCompaniesResponse buildListCompaniesResponse() { |
| final o = api.ListCompaniesResponse(); |
| buildCounterListCompaniesResponse++; |
| if (buildCounterListCompaniesResponse < 3) { |
| o.companies = buildUnnamed31(); |
| o.metadata = buildResponseMetadata(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListCompaniesResponse--; |
| return o; |
| } |
| |
| void checkListCompaniesResponse(api.ListCompaniesResponse o) { |
| buildCounterListCompaniesResponse++; |
| if (buildCounterListCompaniesResponse < 3) { |
| checkUnnamed31(o.companies!); |
| checkResponseMetadata(o.metadata!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterListCompaniesResponse--; |
| } |
| |
| core.List<api.Job> buildUnnamed32() => [buildJob(), buildJob()]; |
| |
| void checkUnnamed32(core.List<api.Job> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkJob(o[0]); |
| checkJob(o[1]); |
| } |
| |
| core.int buildCounterListJobsResponse = 0; |
| api.ListJobsResponse buildListJobsResponse() { |
| final o = api.ListJobsResponse(); |
| buildCounterListJobsResponse++; |
| if (buildCounterListJobsResponse < 3) { |
| o.jobs = buildUnnamed32(); |
| o.metadata = buildResponseMetadata(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterListJobsResponse--; |
| return o; |
| } |
| |
| void checkListJobsResponse(api.ListJobsResponse o) { |
| buildCounterListJobsResponse++; |
| if (buildCounterListJobsResponse < 3) { |
| checkUnnamed32(o.jobs!); |
| checkResponseMetadata(o.metadata!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterListJobsResponse--; |
| } |
| |
| core.int buildCounterLocation = 0; |
| api.Location buildLocation() { |
| final o = api.Location(); |
| buildCounterLocation++; |
| if (buildCounterLocation < 3) { |
| o.latLng = buildLatLng(); |
| o.locationType = 'foo'; |
| o.postalAddress = buildPostalAddress(); |
| o.radiusInMiles = 42.0; |
| } |
| buildCounterLocation--; |
| return o; |
| } |
| |
| void checkLocation(api.Location o) { |
| buildCounterLocation++; |
| if (buildCounterLocation < 3) { |
| checkLatLng(o.latLng!); |
| unittest.expect(o.locationType!, unittest.equals('foo')); |
| checkPostalAddress(o.postalAddress!); |
| unittest.expect(o.radiusInMiles!, unittest.equals(42.0)); |
| } |
| buildCounterLocation--; |
| } |
| |
| core.int buildCounterLocationFilter = 0; |
| api.LocationFilter buildLocationFilter() { |
| final o = api.LocationFilter(); |
| buildCounterLocationFilter++; |
| if (buildCounterLocationFilter < 3) { |
| o.address = 'foo'; |
| o.distanceInMiles = 42.0; |
| o.latLng = buildLatLng(); |
| o.regionCode = 'foo'; |
| o.telecommutePreference = 'foo'; |
| } |
| buildCounterLocationFilter--; |
| return o; |
| } |
| |
| void checkLocationFilter(api.LocationFilter o) { |
| buildCounterLocationFilter++; |
| if (buildCounterLocationFilter < 3) { |
| unittest.expect(o.address!, unittest.equals('foo')); |
| unittest.expect(o.distanceInMiles!, unittest.equals(42.0)); |
| checkLatLng(o.latLng!); |
| unittest.expect(o.regionCode!, unittest.equals('foo')); |
| unittest.expect(o.telecommutePreference!, unittest.equals('foo')); |
| } |
| buildCounterLocationFilter--; |
| } |
| |
| core.int buildCounterMatchingJob = 0; |
| api.MatchingJob buildMatchingJob() { |
| final o = api.MatchingJob(); |
| buildCounterMatchingJob++; |
| if (buildCounterMatchingJob < 3) { |
| o.commuteInfo = buildCommuteInfo(); |
| o.job = buildJob(); |
| o.jobSummary = 'foo'; |
| o.jobTitleSnippet = 'foo'; |
| o.searchTextSnippet = 'foo'; |
| } |
| buildCounterMatchingJob--; |
| return o; |
| } |
| |
| void checkMatchingJob(api.MatchingJob o) { |
| buildCounterMatchingJob++; |
| if (buildCounterMatchingJob < 3) { |
| checkCommuteInfo(o.commuteInfo!); |
| checkJob(o.job!); |
| unittest.expect(o.jobSummary!, unittest.equals('foo')); |
| unittest.expect(o.jobTitleSnippet!, unittest.equals('foo')); |
| unittest.expect(o.searchTextSnippet!, unittest.equals('foo')); |
| } |
| buildCounterMatchingJob--; |
| } |
| |
| core.int buildCounterMoney = 0; |
| api.Money buildMoney() { |
| final o = api.Money(); |
| buildCounterMoney++; |
| if (buildCounterMoney < 3) { |
| o.currencyCode = 'foo'; |
| o.nanos = 42; |
| o.units = 'foo'; |
| } |
| buildCounterMoney--; |
| return o; |
| } |
| |
| void checkMoney(api.Money o) { |
| buildCounterMoney++; |
| if (buildCounterMoney < 3) { |
| unittest.expect(o.currencyCode!, unittest.equals('foo')); |
| unittest.expect(o.nanos!, unittest.equals(42)); |
| unittest.expect(o.units!, unittest.equals('foo')); |
| } |
| buildCounterMoney--; |
| } |
| |
| core.List<core.double> buildUnnamed33() => [42.0, 42.0]; |
| |
| void checkUnnamed33(core.List<core.double> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42.0)); |
| unittest.expect(o[1], unittest.equals(42.0)); |
| } |
| |
| core.int buildCounterNumericBucketingOption = 0; |
| api.NumericBucketingOption buildNumericBucketingOption() { |
| final o = api.NumericBucketingOption(); |
| buildCounterNumericBucketingOption++; |
| if (buildCounterNumericBucketingOption < 3) { |
| o.bucketBounds = buildUnnamed33(); |
| o.requiresMinMax = true; |
| } |
| buildCounterNumericBucketingOption--; |
| return o; |
| } |
| |
| void checkNumericBucketingOption(api.NumericBucketingOption o) { |
| buildCounterNumericBucketingOption++; |
| if (buildCounterNumericBucketingOption < 3) { |
| checkUnnamed33(o.bucketBounds!); |
| unittest.expect(o.requiresMinMax!, unittest.isTrue); |
| } |
| buildCounterNumericBucketingOption--; |
| } |
| |
| core.List<api.BucketizedCount> buildUnnamed34() => [ |
| buildBucketizedCount(), |
| buildBucketizedCount(), |
| ]; |
| |
| void checkUnnamed34(core.List<api.BucketizedCount> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkBucketizedCount(o[0]); |
| checkBucketizedCount(o[1]); |
| } |
| |
| core.int buildCounterNumericBucketingResult = 0; |
| api.NumericBucketingResult buildNumericBucketingResult() { |
| final o = api.NumericBucketingResult(); |
| buildCounterNumericBucketingResult++; |
| if (buildCounterNumericBucketingResult < 3) { |
| o.counts = buildUnnamed34(); |
| o.maxValue = 42.0; |
| o.minValue = 42.0; |
| } |
| buildCounterNumericBucketingResult--; |
| return o; |
| } |
| |
| void checkNumericBucketingResult(api.NumericBucketingResult o) { |
| buildCounterNumericBucketingResult++; |
| if (buildCounterNumericBucketingResult < 3) { |
| checkUnnamed34(o.counts!); |
| unittest.expect(o.maxValue!, unittest.equals(42.0)); |
| unittest.expect(o.minValue!, unittest.equals(42.0)); |
| } |
| buildCounterNumericBucketingResult--; |
| } |
| |
| core.List<core.String> buildUnnamed35() => ['foo', 'foo']; |
| |
| void checkUnnamed35(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.List<core.String> buildUnnamed36() => ['foo', 'foo']; |
| |
| void checkUnnamed36(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 buildCounterPostalAddress = 0; |
| api.PostalAddress buildPostalAddress() { |
| final o = api.PostalAddress(); |
| buildCounterPostalAddress++; |
| if (buildCounterPostalAddress < 3) { |
| o.addressLines = buildUnnamed35(); |
| o.administrativeArea = 'foo'; |
| o.languageCode = 'foo'; |
| o.locality = 'foo'; |
| o.organization = 'foo'; |
| o.postalCode = 'foo'; |
| o.recipients = buildUnnamed36(); |
| o.regionCode = 'foo'; |
| o.revision = 42; |
| o.sortingCode = 'foo'; |
| o.sublocality = 'foo'; |
| } |
| buildCounterPostalAddress--; |
| return o; |
| } |
| |
| void checkPostalAddress(api.PostalAddress o) { |
| buildCounterPostalAddress++; |
| if (buildCounterPostalAddress < 3) { |
| checkUnnamed35(o.addressLines!); |
| unittest.expect(o.administrativeArea!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.locality!, unittest.equals('foo')); |
| unittest.expect(o.organization!, unittest.equals('foo')); |
| unittest.expect(o.postalCode!, unittest.equals('foo')); |
| checkUnnamed36(o.recipients!); |
| unittest.expect(o.regionCode!, unittest.equals('foo')); |
| unittest.expect(o.revision!, unittest.equals(42)); |
| unittest.expect(o.sortingCode!, unittest.equals('foo')); |
| unittest.expect(o.sublocality!, unittest.equals('foo')); |
| } |
| buildCounterPostalAddress--; |
| } |
| |
| core.int buildCounterProcessingOptions = 0; |
| api.ProcessingOptions buildProcessingOptions() { |
| final o = api.ProcessingOptions(); |
| buildCounterProcessingOptions++; |
| if (buildCounterProcessingOptions < 3) { |
| o.disableStreetAddressResolution = true; |
| o.htmlSanitization = 'foo'; |
| } |
| buildCounterProcessingOptions--; |
| return o; |
| } |
| |
| void checkProcessingOptions(api.ProcessingOptions o) { |
| buildCounterProcessingOptions++; |
| if (buildCounterProcessingOptions < 3) { |
| unittest.expect(o.disableStreetAddressResolution!, unittest.isTrue); |
| unittest.expect(o.htmlSanitization!, unittest.equals('foo')); |
| } |
| buildCounterProcessingOptions--; |
| } |
| |
| core.int buildCounterRequestMetadata = 0; |
| api.RequestMetadata buildRequestMetadata() { |
| final o = api.RequestMetadata(); |
| buildCounterRequestMetadata++; |
| if (buildCounterRequestMetadata < 3) { |
| o.deviceInfo = buildDeviceInfo(); |
| o.domain = 'foo'; |
| o.sessionId = 'foo'; |
| o.userId = 'foo'; |
| } |
| buildCounterRequestMetadata--; |
| return o; |
| } |
| |
| void checkRequestMetadata(api.RequestMetadata o) { |
| buildCounterRequestMetadata++; |
| if (buildCounterRequestMetadata < 3) { |
| checkDeviceInfo(o.deviceInfo!); |
| unittest.expect(o.domain!, unittest.equals('foo')); |
| unittest.expect(o.sessionId!, unittest.equals('foo')); |
| unittest.expect(o.userId!, unittest.equals('foo')); |
| } |
| buildCounterRequestMetadata--; |
| } |
| |
| core.int buildCounterResponseMetadata = 0; |
| api.ResponseMetadata buildResponseMetadata() { |
| final o = api.ResponseMetadata(); |
| buildCounterResponseMetadata++; |
| if (buildCounterResponseMetadata < 3) { |
| o.requestId = 'foo'; |
| } |
| buildCounterResponseMetadata--; |
| return o; |
| } |
| |
| void checkResponseMetadata(api.ResponseMetadata o) { |
| buildCounterResponseMetadata++; |
| if (buildCounterResponseMetadata < 3) { |
| unittest.expect(o.requestId!, unittest.equals('foo')); |
| } |
| buildCounterResponseMetadata--; |
| } |
| |
| core.int buildCounterSearchJobsRequest = 0; |
| api.SearchJobsRequest buildSearchJobsRequest() { |
| final o = api.SearchJobsRequest(); |
| buildCounterSearchJobsRequest++; |
| if (buildCounterSearchJobsRequest < 3) { |
| o.disableKeywordMatch = true; |
| o.diversificationLevel = 'foo'; |
| o.enableBroadening = true; |
| o.histogramFacets = buildHistogramFacets(); |
| o.jobQuery = buildJobQuery(); |
| o.jobView = 'foo'; |
| o.offset = 42; |
| o.orderBy = 'foo'; |
| o.pageSize = 42; |
| o.pageToken = 'foo'; |
| o.requestMetadata = buildRequestMetadata(); |
| o.requirePreciseResultSize = true; |
| o.searchMode = 'foo'; |
| } |
| buildCounterSearchJobsRequest--; |
| return o; |
| } |
| |
| void checkSearchJobsRequest(api.SearchJobsRequest o) { |
| buildCounterSearchJobsRequest++; |
| if (buildCounterSearchJobsRequest < 3) { |
| unittest.expect(o.disableKeywordMatch!, unittest.isTrue); |
| unittest.expect(o.diversificationLevel!, unittest.equals('foo')); |
| unittest.expect(o.enableBroadening!, unittest.isTrue); |
| checkHistogramFacets(o.histogramFacets!); |
| checkJobQuery(o.jobQuery!); |
| unittest.expect(o.jobView!, unittest.equals('foo')); |
| unittest.expect(o.offset!, unittest.equals(42)); |
| unittest.expect(o.orderBy!, unittest.equals('foo')); |
| unittest.expect(o.pageSize!, unittest.equals(42)); |
| unittest.expect(o.pageToken!, unittest.equals('foo')); |
| checkRequestMetadata(o.requestMetadata!); |
| unittest.expect(o.requirePreciseResultSize!, unittest.isTrue); |
| unittest.expect(o.searchMode!, unittest.equals('foo')); |
| } |
| buildCounterSearchJobsRequest--; |
| } |
| |
| core.List<api.Location> buildUnnamed37() => [buildLocation(), buildLocation()]; |
| |
| void checkUnnamed37(core.List<api.Location> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkLocation(o[0]); |
| checkLocation(o[1]); |
| } |
| |
| core.List<api.MatchingJob> buildUnnamed38() => [ |
| buildMatchingJob(), |
| buildMatchingJob(), |
| ]; |
| |
| void checkUnnamed38(core.List<api.MatchingJob> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkMatchingJob(o[0]); |
| checkMatchingJob(o[1]); |
| } |
| |
| core.int buildCounterSearchJobsResponse = 0; |
| api.SearchJobsResponse buildSearchJobsResponse() { |
| final o = api.SearchJobsResponse(); |
| buildCounterSearchJobsResponse++; |
| if (buildCounterSearchJobsResponse < 3) { |
| o.broadenedQueryJobsCount = 42; |
| o.estimatedTotalSize = 42; |
| o.histogramResults = buildHistogramResults(); |
| o.locationFilters = buildUnnamed37(); |
| o.matchingJobs = buildUnnamed38(); |
| o.metadata = buildResponseMetadata(); |
| o.nextPageToken = 'foo'; |
| o.spellCorrection = buildSpellingCorrection(); |
| o.totalSize = 42; |
| } |
| buildCounterSearchJobsResponse--; |
| return o; |
| } |
| |
| void checkSearchJobsResponse(api.SearchJobsResponse o) { |
| buildCounterSearchJobsResponse++; |
| if (buildCounterSearchJobsResponse < 3) { |
| unittest.expect(o.broadenedQueryJobsCount!, unittest.equals(42)); |
| unittest.expect(o.estimatedTotalSize!, unittest.equals(42)); |
| checkHistogramResults(o.histogramResults!); |
| checkUnnamed37(o.locationFilters!); |
| checkUnnamed38(o.matchingJobs!); |
| checkResponseMetadata(o.metadata!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkSpellingCorrection(o.spellCorrection!); |
| unittest.expect(o.totalSize!, unittest.equals(42)); |
| } |
| buildCounterSearchJobsResponse--; |
| } |
| |
| core.int buildCounterSpellingCorrection = 0; |
| api.SpellingCorrection buildSpellingCorrection() { |
| final o = api.SpellingCorrection(); |
| buildCounterSpellingCorrection++; |
| if (buildCounterSpellingCorrection < 3) { |
| o.corrected = true; |
| o.correctedText = 'foo'; |
| } |
| buildCounterSpellingCorrection--; |
| return o; |
| } |
| |
| void checkSpellingCorrection(api.SpellingCorrection o) { |
| buildCounterSpellingCorrection++; |
| if (buildCounterSpellingCorrection < 3) { |
| unittest.expect(o.corrected!, unittest.isTrue); |
| unittest.expect(o.correctedText!, unittest.equals('foo')); |
| } |
| buildCounterSpellingCorrection--; |
| } |
| |
| core.int buildCounterTimeOfDay = 0; |
| api.TimeOfDay buildTimeOfDay() { |
| final o = api.TimeOfDay(); |
| buildCounterTimeOfDay++; |
| if (buildCounterTimeOfDay < 3) { |
| o.hours = 42; |
| o.minutes = 42; |
| o.nanos = 42; |
| o.seconds = 42; |
| } |
| buildCounterTimeOfDay--; |
| return o; |
| } |
| |
| void checkTimeOfDay(api.TimeOfDay o) { |
| buildCounterTimeOfDay++; |
| if (buildCounterTimeOfDay < 3) { |
| unittest.expect(o.hours!, unittest.equals(42)); |
| unittest.expect(o.minutes!, unittest.equals(42)); |
| unittest.expect(o.nanos!, unittest.equals(42)); |
| unittest.expect(o.seconds!, unittest.equals(42)); |
| } |
| buildCounterTimeOfDay--; |
| } |
| |
| core.int buildCounterTimestampRange = 0; |
| api.TimestampRange buildTimestampRange() { |
| final o = api.TimestampRange(); |
| buildCounterTimestampRange++; |
| if (buildCounterTimestampRange < 3) { |
| o.endTime = 'foo'; |
| o.startTime = 'foo'; |
| } |
| buildCounterTimestampRange--; |
| return o; |
| } |
| |
| void checkTimestampRange(api.TimestampRange o) { |
| buildCounterTimestampRange++; |
| if (buildCounterTimestampRange < 3) { |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| } |
| buildCounterTimestampRange--; |
| } |
| |
| core.int buildCounterUpdateCompanyRequest = 0; |
| api.UpdateCompanyRequest buildUpdateCompanyRequest() { |
| final o = api.UpdateCompanyRequest(); |
| buildCounterUpdateCompanyRequest++; |
| if (buildCounterUpdateCompanyRequest < 3) { |
| o.company = buildCompany(); |
| o.updateMask = 'foo'; |
| } |
| buildCounterUpdateCompanyRequest--; |
| return o; |
| } |
| |
| void checkUpdateCompanyRequest(api.UpdateCompanyRequest o) { |
| buildCounterUpdateCompanyRequest++; |
| if (buildCounterUpdateCompanyRequest < 3) { |
| checkCompany(o.company!); |
| unittest.expect(o.updateMask!, unittest.equals('foo')); |
| } |
| buildCounterUpdateCompanyRequest--; |
| } |
| |
| core.int buildCounterUpdateJobRequest = 0; |
| api.UpdateJobRequest buildUpdateJobRequest() { |
| final o = api.UpdateJobRequest(); |
| buildCounterUpdateJobRequest++; |
| if (buildCounterUpdateJobRequest < 3) { |
| o.job = buildJob(); |
| o.updateMask = 'foo'; |
| } |
| buildCounterUpdateJobRequest--; |
| return o; |
| } |
| |
| void checkUpdateJobRequest(api.UpdateJobRequest o) { |
| buildCounterUpdateJobRequest++; |
| if (buildCounterUpdateJobRequest < 3) { |
| checkJob(o.job!); |
| unittest.expect(o.updateMask!, unittest.equals('foo')); |
| } |
| buildCounterUpdateJobRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed39() => ['foo', 'foo']; |
| |
| void checkUnnamed39(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')); |
| } |
| |
| void main() { |
| unittest.group('obj-schema-ApplicationInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildApplicationInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ApplicationInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkApplicationInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BatchDeleteJobsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBatchDeleteJobsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BatchDeleteJobsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchDeleteJobsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BucketRange', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBucketRange(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BucketRange.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBucketRange(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-BucketizedCount', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildBucketizedCount(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.BucketizedCount.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkBucketizedCount(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ClientEvent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildClientEvent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ClientEvent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkClientEvent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CommuteFilter', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCommuteFilter(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CommuteFilter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCommuteFilter(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CommuteInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCommuteInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CommuteInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCommuteInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Company', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompany(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Company.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompany(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompanyDerivedInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompanyDerivedInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompanyDerivedInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompanyDerivedInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompensationEntry', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompensationEntry(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompensationEntry.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompensationEntry(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompensationFilter', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompensationFilter(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompensationFilter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompensationFilter(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompensationHistogramRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompensationHistogramRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompensationHistogramRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompensationHistogramRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompensationHistogramResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompensationHistogramResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompensationHistogramResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompensationHistogramResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompensationInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompensationInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompensationInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompensationInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompensationRange', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompensationRange(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompensationRange.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompensationRange(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompleteQueryResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompleteQueryResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompleteQueryResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompleteQueryResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CompletionResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCompletionResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CompletionResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCompletionResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreateClientEventRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreateClientEventRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreateClientEventRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateClientEventRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreateCompanyRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreateCompanyRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreateCompanyRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateCompanyRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CreateJobRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCreateJobRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CreateJobRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateJobRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomAttribute', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCustomAttribute(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CustomAttribute.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCustomAttribute(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomAttributeHistogramRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCustomAttributeHistogramRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CustomAttributeHistogramRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCustomAttributeHistogramRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-CustomAttributeHistogramResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildCustomAttributeHistogramResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.CustomAttributeHistogramResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkCustomAttributeHistogramResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-DeviceInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildDeviceInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.DeviceInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkDeviceInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Empty', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildEmpty(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Empty.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkEmpty(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HistogramFacets', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHistogramFacets(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HistogramFacets.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHistogramFacets(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HistogramResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHistogramResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HistogramResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHistogramResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-HistogramResults', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildHistogramResults(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.HistogramResults.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkHistogramResults(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Job', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildJob(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Job.fromJson(oJson as core.Map<core.String, core.dynamic>); |
| checkJob(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-JobDerivedInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildJobDerivedInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.JobDerivedInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkJobDerivedInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-JobEvent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildJobEvent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.JobEvent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkJobEvent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-JobQuery', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildJobQuery(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.JobQuery.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkJobQuery(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LatLng', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLatLng(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LatLng.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLatLng(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListCompaniesResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListCompaniesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListCompaniesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListCompaniesResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ListJobsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildListJobsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ListJobsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkListJobsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Location', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLocation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Location.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLocation(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-LocationFilter', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildLocationFilter(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.LocationFilter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkLocationFilter(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-MatchingJob', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMatchingJob(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.MatchingJob.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMatchingJob(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-Money', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildMoney(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.Money.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkMoney(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NumericBucketingOption', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNumericBucketingOption(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NumericBucketingOption.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNumericBucketingOption(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-NumericBucketingResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildNumericBucketingResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.NumericBucketingResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkNumericBucketingResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-PostalAddress', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildPostalAddress(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.PostalAddress.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkPostalAddress(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ProcessingOptions', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildProcessingOptions(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ProcessingOptions.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkProcessingOptions(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-RequestMetadata', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildRequestMetadata(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.RequestMetadata.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkRequestMetadata(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-ResponseMetadata', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildResponseMetadata(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.ResponseMetadata.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkResponseMetadata(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SearchJobsRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSearchJobsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SearchJobsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSearchJobsRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SearchJobsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSearchJobsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SearchJobsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSearchJobsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-SpellingCorrection', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildSpellingCorrection(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.SpellingCorrection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkSpellingCorrection(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TimeOfDay', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildTimeOfDay(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.TimeOfDay.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkTimeOfDay(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-TimestampRange', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildTimestampRange(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.TimestampRange.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkTimestampRange(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpdateCompanyRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpdateCompanyRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpdateCompanyRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateCompanyRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-UpdateJobRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildUpdateJobRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.UpdateJobRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateJobRequest(od); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsResource', () { |
| unittest.test('method--complete', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects; |
| final arg_name = 'foo'; |
| final arg_companyName = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_languageCodes = buildUnnamed39(); |
| final arg_pageSize = 42; |
| final arg_query = 'foo'; |
| final arg_scope = 'foo'; |
| final arg_type = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['companyName']!.first, |
| unittest.equals(arg_companyName), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['languageCodes']!, |
| unittest.equals(arg_languageCodes), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect(queryMap['query']!.first, unittest.equals(arg_query)); |
| unittest.expect(queryMap['scope']!.first, unittest.equals(arg_scope)); |
| unittest.expect(queryMap['type']!.first, unittest.equals(arg_type)); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCompleteQueryResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.complete( |
| arg_name, |
| companyName: arg_companyName, |
| languageCode: arg_languageCode, |
| languageCodes: arg_languageCodes, |
| pageSize: arg_pageSize, |
| query: arg_query, |
| scope: arg_scope, |
| type: arg_type, |
| $fields: arg_$fields, |
| ); |
| checkCompleteQueryResponse(response as api.CompleteQueryResponse); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsClientEventsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.clientEvents; |
| final arg_request = buildCreateClientEventRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateClientEventRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateClientEventRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildClientEvent()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkClientEvent(response as api.ClientEvent); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsCompaniesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.companies; |
| final arg_request = buildCreateCompanyRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateCompanyRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateCompanyRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCompany()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkCompany(response as api.Company); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.companies; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkEmpty(response as api.Empty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.companies; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCompany()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkCompany(response as api.Company); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.companies; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_requireOpenJobs = true; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['requireOpenJobs']!.first, |
| unittest.equals('$arg_requireOpenJobs'), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListCompaniesResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| requireOpenJobs: arg_requireOpenJobs, |
| $fields: arg_$fields, |
| ); |
| checkListCompaniesResponse(response as api.ListCompaniesResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.companies; |
| final arg_request = buildUpdateCompanyRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateCompanyRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateCompanyRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildCompany()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkCompany(response as api.Company); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsJobsResource', () { |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_request = buildBatchDeleteJobsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.BatchDeleteJobsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkBatchDeleteJobsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkEmpty(response as api.Empty); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_request = buildCreateJobRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.CreateJobRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkCreateJobRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildJob()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkJob(response as api.Job); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkEmpty(response as api.Empty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildJob()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkJob(response as api.Job); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_jobView = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| queryMap['jobView']!.first, |
| unittest.equals(arg_jobView), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildListJobsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| jobView: arg_jobView, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkListJobsResponse(response as api.ListJobsResponse); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_request = buildUpdateJobRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.UpdateJobRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkUpdateJobRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildJob()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkJob(response as api.Job); |
| }); |
| |
| unittest.test('method--search', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_request = buildSearchJobsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SearchJobsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSearchJobsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildSearchJobsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.search( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkSearchJobsResponse(response as api.SearchJobsResponse); |
| }); |
| |
| unittest.test('method--searchForAlert', () async { |
| final mock = HttpServerMock(); |
| final res = api.CloudTalentSolutionApi(mock).projects.jobs; |
| final arg_request = buildSearchJobsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.SearchJobsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkSearchJobsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v3/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildSearchJobsResponse()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.searchForAlert( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkSearchJobsResponse(response as api.SearchJobsResponse); |
| }); |
| }); |
| } |