| OLD | NEW |
| 1 library googleapis.tasks.v1.test; | 1 library googleapis.tasks.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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 checkTaskLinks(api.TaskLinks o) { | 67 checkTaskLinks(api.TaskLinks o) { |
| 68 buildCounterTaskLinks++; | 68 buildCounterTaskLinks++; |
| 69 if (buildCounterTaskLinks < 3) { | 69 if (buildCounterTaskLinks < 3) { |
| 70 unittest.expect(o.description, unittest.equals('foo')); | 70 unittest.expect(o.description, unittest.equals('foo')); |
| 71 unittest.expect(o.link, unittest.equals('foo')); | 71 unittest.expect(o.link, unittest.equals('foo')); |
| 72 unittest.expect(o.type, unittest.equals('foo')); | 72 unittest.expect(o.type, unittest.equals('foo')); |
| 73 } | 73 } |
| 74 buildCounterTaskLinks--; | 74 buildCounterTaskLinks--; |
| 75 } | 75 } |
| 76 | 76 |
| 77 buildUnnamed2971() { | 77 buildUnnamed3062() { |
| 78 var o = new core.List<api.TaskLinks>(); | 78 var o = new core.List<api.TaskLinks>(); |
| 79 o.add(buildTaskLinks()); | 79 o.add(buildTaskLinks()); |
| 80 o.add(buildTaskLinks()); | 80 o.add(buildTaskLinks()); |
| 81 return o; | 81 return o; |
| 82 } | 82 } |
| 83 | 83 |
| 84 checkUnnamed2971(core.List<api.TaskLinks> o) { | 84 checkUnnamed3062(core.List<api.TaskLinks> o) { |
| 85 unittest.expect(o, unittest.hasLength(2)); | 85 unittest.expect(o, unittest.hasLength(2)); |
| 86 checkTaskLinks(o[0]); | 86 checkTaskLinks(o[0]); |
| 87 checkTaskLinks(o[1]); | 87 checkTaskLinks(o[1]); |
| 88 } | 88 } |
| 89 | 89 |
| 90 core.int buildCounterTask = 0; | 90 core.int buildCounterTask = 0; |
| 91 buildTask() { | 91 buildTask() { |
| 92 var o = new api.Task(); | 92 var o = new api.Task(); |
| 93 buildCounterTask++; | 93 buildCounterTask++; |
| 94 if (buildCounterTask < 3) { | 94 if (buildCounterTask < 3) { |
| 95 o.completed = core.DateTime.parse("2002-02-27T14:01:02"); | 95 o.completed = core.DateTime.parse("2002-02-27T14:01:02"); |
| 96 o.deleted = true; | 96 o.deleted = true; |
| 97 o.due = core.DateTime.parse("2002-02-27T14:01:02"); | 97 o.due = core.DateTime.parse("2002-02-27T14:01:02"); |
| 98 o.etag = "foo"; | 98 o.etag = "foo"; |
| 99 o.hidden = true; | 99 o.hidden = true; |
| 100 o.id = "foo"; | 100 o.id = "foo"; |
| 101 o.kind = "foo"; | 101 o.kind = "foo"; |
| 102 o.links = buildUnnamed2971(); | 102 o.links = buildUnnamed3062(); |
| 103 o.notes = "foo"; | 103 o.notes = "foo"; |
| 104 o.parent = "foo"; | 104 o.parent = "foo"; |
| 105 o.position = "foo"; | 105 o.position = "foo"; |
| 106 o.selfLink = "foo"; | 106 o.selfLink = "foo"; |
| 107 o.status = "foo"; | 107 o.status = "foo"; |
| 108 o.title = "foo"; | 108 o.title = "foo"; |
| 109 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 109 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 110 } | 110 } |
| 111 buildCounterTask--; | 111 buildCounterTask--; |
| 112 return o; | 112 return o; |
| 113 } | 113 } |
| 114 | 114 |
| 115 checkTask(api.Task o) { | 115 checkTask(api.Task o) { |
| 116 buildCounterTask++; | 116 buildCounterTask++; |
| 117 if (buildCounterTask < 3) { | 117 if (buildCounterTask < 3) { |
| 118 unittest.expect(o.completed, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 118 unittest.expect(o.completed, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
| 119 unittest.expect(o.deleted, unittest.isTrue); | 119 unittest.expect(o.deleted, unittest.isTrue); |
| 120 unittest.expect(o.due, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); | 120 unittest.expect(o.due, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); |
| 121 unittest.expect(o.etag, unittest.equals('foo')); | 121 unittest.expect(o.etag, unittest.equals('foo')); |
| 122 unittest.expect(o.hidden, unittest.isTrue); | 122 unittest.expect(o.hidden, unittest.isTrue); |
| 123 unittest.expect(o.id, unittest.equals('foo')); | 123 unittest.expect(o.id, unittest.equals('foo')); |
| 124 unittest.expect(o.kind, unittest.equals('foo')); | 124 unittest.expect(o.kind, unittest.equals('foo')); |
| 125 checkUnnamed2971(o.links); | 125 checkUnnamed3062(o.links); |
| 126 unittest.expect(o.notes, unittest.equals('foo')); | 126 unittest.expect(o.notes, unittest.equals('foo')); |
| 127 unittest.expect(o.parent, unittest.equals('foo')); | 127 unittest.expect(o.parent, unittest.equals('foo')); |
| 128 unittest.expect(o.position, unittest.equals('foo')); | 128 unittest.expect(o.position, unittest.equals('foo')); |
| 129 unittest.expect(o.selfLink, unittest.equals('foo')); | 129 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 130 unittest.expect(o.status, unittest.equals('foo')); | 130 unittest.expect(o.status, unittest.equals('foo')); |
| 131 unittest.expect(o.title, unittest.equals('foo')); | 131 unittest.expect(o.title, unittest.equals('foo')); |
| 132 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 132 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
| 133 } | 133 } |
| 134 buildCounterTask--; | 134 buildCounterTask--; |
| 135 } | 135 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 156 unittest.expect(o.etag, unittest.equals('foo')); | 156 unittest.expect(o.etag, unittest.equals('foo')); |
| 157 unittest.expect(o.id, unittest.equals('foo')); | 157 unittest.expect(o.id, unittest.equals('foo')); |
| 158 unittest.expect(o.kind, unittest.equals('foo')); | 158 unittest.expect(o.kind, unittest.equals('foo')); |
| 159 unittest.expect(o.selfLink, unittest.equals('foo')); | 159 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 160 unittest.expect(o.title, unittest.equals('foo')); | 160 unittest.expect(o.title, unittest.equals('foo')); |
| 161 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 161 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
| 162 } | 162 } |
| 163 buildCounterTaskList--; | 163 buildCounterTaskList--; |
| 164 } | 164 } |
| 165 | 165 |
| 166 buildUnnamed2972() { | 166 buildUnnamed3063() { |
| 167 var o = new core.List<api.TaskList>(); | 167 var o = new core.List<api.TaskList>(); |
| 168 o.add(buildTaskList()); | 168 o.add(buildTaskList()); |
| 169 o.add(buildTaskList()); | 169 o.add(buildTaskList()); |
| 170 return o; | 170 return o; |
| 171 } | 171 } |
| 172 | 172 |
| 173 checkUnnamed2972(core.List<api.TaskList> o) { | 173 checkUnnamed3063(core.List<api.TaskList> o) { |
| 174 unittest.expect(o, unittest.hasLength(2)); | 174 unittest.expect(o, unittest.hasLength(2)); |
| 175 checkTaskList(o[0]); | 175 checkTaskList(o[0]); |
| 176 checkTaskList(o[1]); | 176 checkTaskList(o[1]); |
| 177 } | 177 } |
| 178 | 178 |
| 179 core.int buildCounterTaskLists = 0; | 179 core.int buildCounterTaskLists = 0; |
| 180 buildTaskLists() { | 180 buildTaskLists() { |
| 181 var o = new api.TaskLists(); | 181 var o = new api.TaskLists(); |
| 182 buildCounterTaskLists++; | 182 buildCounterTaskLists++; |
| 183 if (buildCounterTaskLists < 3) { | 183 if (buildCounterTaskLists < 3) { |
| 184 o.etag = "foo"; | 184 o.etag = "foo"; |
| 185 o.items = buildUnnamed2972(); | 185 o.items = buildUnnamed3063(); |
| 186 o.kind = "foo"; | 186 o.kind = "foo"; |
| 187 o.nextPageToken = "foo"; | 187 o.nextPageToken = "foo"; |
| 188 } | 188 } |
| 189 buildCounterTaskLists--; | 189 buildCounterTaskLists--; |
| 190 return o; | 190 return o; |
| 191 } | 191 } |
| 192 | 192 |
| 193 checkTaskLists(api.TaskLists o) { | 193 checkTaskLists(api.TaskLists o) { |
| 194 buildCounterTaskLists++; | 194 buildCounterTaskLists++; |
| 195 if (buildCounterTaskLists < 3) { | 195 if (buildCounterTaskLists < 3) { |
| 196 unittest.expect(o.etag, unittest.equals('foo')); | 196 unittest.expect(o.etag, unittest.equals('foo')); |
| 197 checkUnnamed2972(o.items); | 197 checkUnnamed3063(o.items); |
| 198 unittest.expect(o.kind, unittest.equals('foo')); | 198 unittest.expect(o.kind, unittest.equals('foo')); |
| 199 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 199 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 200 } | 200 } |
| 201 buildCounterTaskLists--; | 201 buildCounterTaskLists--; |
| 202 } | 202 } |
| 203 | 203 |
| 204 buildUnnamed2973() { | 204 buildUnnamed3064() { |
| 205 var o = new core.List<api.Task>(); | 205 var o = new core.List<api.Task>(); |
| 206 o.add(buildTask()); | 206 o.add(buildTask()); |
| 207 o.add(buildTask()); | 207 o.add(buildTask()); |
| 208 return o; | 208 return o; |
| 209 } | 209 } |
| 210 | 210 |
| 211 checkUnnamed2973(core.List<api.Task> o) { | 211 checkUnnamed3064(core.List<api.Task> o) { |
| 212 unittest.expect(o, unittest.hasLength(2)); | 212 unittest.expect(o, unittest.hasLength(2)); |
| 213 checkTask(o[0]); | 213 checkTask(o[0]); |
| 214 checkTask(o[1]); | 214 checkTask(o[1]); |
| 215 } | 215 } |
| 216 | 216 |
| 217 core.int buildCounterTasks = 0; | 217 core.int buildCounterTasks = 0; |
| 218 buildTasks() { | 218 buildTasks() { |
| 219 var o = new api.Tasks(); | 219 var o = new api.Tasks(); |
| 220 buildCounterTasks++; | 220 buildCounterTasks++; |
| 221 if (buildCounterTasks < 3) { | 221 if (buildCounterTasks < 3) { |
| 222 o.etag = "foo"; | 222 o.etag = "foo"; |
| 223 o.items = buildUnnamed2973(); | 223 o.items = buildUnnamed3064(); |
| 224 o.kind = "foo"; | 224 o.kind = "foo"; |
| 225 o.nextPageToken = "foo"; | 225 o.nextPageToken = "foo"; |
| 226 } | 226 } |
| 227 buildCounterTasks--; | 227 buildCounterTasks--; |
| 228 return o; | 228 return o; |
| 229 } | 229 } |
| 230 | 230 |
| 231 checkTasks(api.Tasks o) { | 231 checkTasks(api.Tasks o) { |
| 232 buildCounterTasks++; | 232 buildCounterTasks++; |
| 233 if (buildCounterTasks < 3) { | 233 if (buildCounterTasks < 3) { |
| 234 unittest.expect(o.etag, unittest.equals('foo')); | 234 unittest.expect(o.etag, unittest.equals('foo')); |
| 235 checkUnnamed2973(o.items); | 235 checkUnnamed3064(o.items); |
| 236 unittest.expect(o.kind, unittest.equals('foo')); | 236 unittest.expect(o.kind, unittest.equals('foo')); |
| 237 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 237 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 238 } | 238 } |
| 239 buildCounterTasks--; | 239 buildCounterTasks--; |
| 240 } | 240 } |
| 241 | 241 |
| 242 | 242 |
| 243 main() { | 243 main() { |
| 244 unittest.group("obj-schema-TaskLinks", () { | 244 unittest.group("obj-schema-TaskLinks", () { |
| 245 unittest.test("to-json--from-json", () { | 245 unittest.test("to-json--from-json", () { |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 res.update(arg_request, arg_tasklist, arg_task).then(unittest.expectAsync(
((api.Task response) { | 1073 res.update(arg_request, arg_tasklist, arg_task).then(unittest.expectAsync(
((api.Task response) { |
| 1074 checkTask(response); | 1074 checkTask(response); |
| 1075 }))); | 1075 }))); |
| 1076 }); | 1076 }); |
| 1077 | 1077 |
| 1078 }); | 1078 }); |
| 1079 | 1079 |
| 1080 | 1080 |
| 1081 } | 1081 } |
| 1082 | 1082 |
| OLD | NEW |