OLD | NEW |
1 library googleapis.firebasedynamiclinks.v1.test; | 1 library googleapis.firebasedynamiclinks.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 checkCreateShortDynamicLinkRequest(api.CreateShortDynamicLinkRequest o) { | 113 checkCreateShortDynamicLinkRequest(api.CreateShortDynamicLinkRequest o) { |
114 buildCounterCreateShortDynamicLinkRequest++; | 114 buildCounterCreateShortDynamicLinkRequest++; |
115 if (buildCounterCreateShortDynamicLinkRequest < 3) { | 115 if (buildCounterCreateShortDynamicLinkRequest < 3) { |
116 checkDynamicLinkInfo(o.dynamicLinkInfo); | 116 checkDynamicLinkInfo(o.dynamicLinkInfo); |
117 unittest.expect(o.longDynamicLink, unittest.equals('foo')); | 117 unittest.expect(o.longDynamicLink, unittest.equals('foo')); |
118 checkSuffix(o.suffix); | 118 checkSuffix(o.suffix); |
119 } | 119 } |
120 buildCounterCreateShortDynamicLinkRequest--; | 120 buildCounterCreateShortDynamicLinkRequest--; |
121 } | 121 } |
122 | 122 |
123 buildUnnamed1960() { | 123 buildUnnamed1972() { |
124 var o = new core.List<api.DynamicLinkWarning>(); | 124 var o = new core.List<api.DynamicLinkWarning>(); |
125 o.add(buildDynamicLinkWarning()); | 125 o.add(buildDynamicLinkWarning()); |
126 o.add(buildDynamicLinkWarning()); | 126 o.add(buildDynamicLinkWarning()); |
127 return o; | 127 return o; |
128 } | 128 } |
129 | 129 |
130 checkUnnamed1960(core.List<api.DynamicLinkWarning> o) { | 130 checkUnnamed1972(core.List<api.DynamicLinkWarning> o) { |
131 unittest.expect(o, unittest.hasLength(2)); | 131 unittest.expect(o, unittest.hasLength(2)); |
132 checkDynamicLinkWarning(o[0]); | 132 checkDynamicLinkWarning(o[0]); |
133 checkDynamicLinkWarning(o[1]); | 133 checkDynamicLinkWarning(o[1]); |
134 } | 134 } |
135 | 135 |
136 core.int buildCounterCreateShortDynamicLinkResponse = 0; | 136 core.int buildCounterCreateShortDynamicLinkResponse = 0; |
137 buildCreateShortDynamicLinkResponse() { | 137 buildCreateShortDynamicLinkResponse() { |
138 var o = new api.CreateShortDynamicLinkResponse(); | 138 var o = new api.CreateShortDynamicLinkResponse(); |
139 buildCounterCreateShortDynamicLinkResponse++; | 139 buildCounterCreateShortDynamicLinkResponse++; |
140 if (buildCounterCreateShortDynamicLinkResponse < 3) { | 140 if (buildCounterCreateShortDynamicLinkResponse < 3) { |
141 o.previewLink = "foo"; | 141 o.previewLink = "foo"; |
142 o.shortLink = "foo"; | 142 o.shortLink = "foo"; |
143 o.warning = buildUnnamed1960(); | 143 o.warning = buildUnnamed1972(); |
144 } | 144 } |
145 buildCounterCreateShortDynamicLinkResponse--; | 145 buildCounterCreateShortDynamicLinkResponse--; |
146 return o; | 146 return o; |
147 } | 147 } |
148 | 148 |
149 checkCreateShortDynamicLinkResponse(api.CreateShortDynamicLinkResponse o) { | 149 checkCreateShortDynamicLinkResponse(api.CreateShortDynamicLinkResponse o) { |
150 buildCounterCreateShortDynamicLinkResponse++; | 150 buildCounterCreateShortDynamicLinkResponse++; |
151 if (buildCounterCreateShortDynamicLinkResponse < 3) { | 151 if (buildCounterCreateShortDynamicLinkResponse < 3) { |
152 unittest.expect(o.previewLink, unittest.equals('foo')); | 152 unittest.expect(o.previewLink, unittest.equals('foo')); |
153 unittest.expect(o.shortLink, unittest.equals('foo')); | 153 unittest.expect(o.shortLink, unittest.equals('foo')); |
154 checkUnnamed1960(o.warning); | 154 checkUnnamed1972(o.warning); |
155 } | 155 } |
156 buildCounterCreateShortDynamicLinkResponse--; | 156 buildCounterCreateShortDynamicLinkResponse--; |
157 } | 157 } |
158 | 158 |
159 core.int buildCounterDynamicLinkInfo = 0; | 159 core.int buildCounterDynamicLinkInfo = 0; |
160 buildDynamicLinkInfo() { | 160 buildDynamicLinkInfo() { |
161 var o = new api.DynamicLinkInfo(); | 161 var o = new api.DynamicLinkInfo(); |
162 buildCounterDynamicLinkInfo++; | 162 buildCounterDynamicLinkInfo++; |
163 if (buildCounterDynamicLinkInfo < 3) { | 163 if (buildCounterDynamicLinkInfo < 3) { |
164 o.analyticsInfo = buildAnalyticsInfo(); | 164 o.analyticsInfo = buildAnalyticsInfo(); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 res.create(arg_request).then(unittest.expectAsync(((api.CreateShortDynamic
LinkResponse response) { | 508 res.create(arg_request).then(unittest.expectAsync(((api.CreateShortDynamic
LinkResponse response) { |
509 checkCreateShortDynamicLinkResponse(response); | 509 checkCreateShortDynamicLinkResponse(response); |
510 }))); | 510 }))); |
511 }); | 511 }); |
512 | 512 |
513 }); | 513 }); |
514 | 514 |
515 | 515 |
516 } | 516 } |
517 | 517 |
OLD | NEW |