| 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 21 matching lines...) Expand all Loading... |
| 32 checkTaskLinks(api.TaskLinks o) { | 32 checkTaskLinks(api.TaskLinks o) { |
| 33 buildCounterTaskLinks++; | 33 buildCounterTaskLinks++; |
| 34 if (buildCounterTaskLinks < 3) { | 34 if (buildCounterTaskLinks < 3) { |
| 35 unittest.expect(o.description, unittest.equals('foo')); | 35 unittest.expect(o.description, unittest.equals('foo')); |
| 36 unittest.expect(o.link, unittest.equals('foo')); | 36 unittest.expect(o.link, unittest.equals('foo')); |
| 37 unittest.expect(o.type, unittest.equals('foo')); | 37 unittest.expect(o.type, unittest.equals('foo')); |
| 38 } | 38 } |
| 39 buildCounterTaskLinks--; | 39 buildCounterTaskLinks--; |
| 40 } | 40 } |
| 41 | 41 |
| 42 buildUnnamed567() { | 42 buildUnnamed1086() { |
| 43 var o = new core.List<api.TaskLinks>(); | 43 var o = new core.List<api.TaskLinks>(); |
| 44 o.add(buildTaskLinks()); | 44 o.add(buildTaskLinks()); |
| 45 o.add(buildTaskLinks()); | 45 o.add(buildTaskLinks()); |
| 46 return o; | 46 return o; |
| 47 } | 47 } |
| 48 | 48 |
| 49 checkUnnamed567(core.List<api.TaskLinks> o) { | 49 checkUnnamed1086(core.List<api.TaskLinks> o) { |
| 50 unittest.expect(o, unittest.hasLength(2)); | 50 unittest.expect(o, unittest.hasLength(2)); |
| 51 checkTaskLinks(o[0]); | 51 checkTaskLinks(o[0]); |
| 52 checkTaskLinks(o[1]); | 52 checkTaskLinks(o[1]); |
| 53 } | 53 } |
| 54 | 54 |
| 55 core.int buildCounterTask = 0; | 55 core.int buildCounterTask = 0; |
| 56 buildTask() { | 56 buildTask() { |
| 57 var o = new api.Task(); | 57 var o = new api.Task(); |
| 58 buildCounterTask++; | 58 buildCounterTask++; |
| 59 if (buildCounterTask < 3) { | 59 if (buildCounterTask < 3) { |
| 60 o.completed = core.DateTime.parse("2002-02-27T14:01:02"); | 60 o.completed = core.DateTime.parse("2002-02-27T14:01:02"); |
| 61 o.deleted = true; | 61 o.deleted = true; |
| 62 o.due = core.DateTime.parse("2002-02-27T14:01:02"); | 62 o.due = core.DateTime.parse("2002-02-27T14:01:02"); |
| 63 o.etag = "foo"; | 63 o.etag = "foo"; |
| 64 o.hidden = true; | 64 o.hidden = true; |
| 65 o.id = "foo"; | 65 o.id = "foo"; |
| 66 o.kind = "foo"; | 66 o.kind = "foo"; |
| 67 o.links = buildUnnamed567(); | 67 o.links = buildUnnamed1086(); |
| 68 o.notes = "foo"; | 68 o.notes = "foo"; |
| 69 o.parent = "foo"; | 69 o.parent = "foo"; |
| 70 o.position = "foo"; | 70 o.position = "foo"; |
| 71 o.selfLink = "foo"; | 71 o.selfLink = "foo"; |
| 72 o.status = "foo"; | 72 o.status = "foo"; |
| 73 o.title = "foo"; | 73 o.title = "foo"; |
| 74 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 74 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 75 } | 75 } |
| 76 buildCounterTask--; | 76 buildCounterTask--; |
| 77 return o; | 77 return o; |
| 78 } | 78 } |
| 79 | 79 |
| 80 checkTask(api.Task o) { | 80 checkTask(api.Task o) { |
| 81 buildCounterTask++; | 81 buildCounterTask++; |
| 82 if (buildCounterTask < 3) { | 82 if (buildCounterTask < 3) { |
| 83 unittest.expect(o.completed, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 83 unittest.expect(o.completed, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
| 84 unittest.expect(o.deleted, unittest.isTrue); | 84 unittest.expect(o.deleted, unittest.isTrue); |
| 85 unittest.expect(o.due, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); | 85 unittest.expect(o.due, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); |
| 86 unittest.expect(o.etag, unittest.equals('foo')); | 86 unittest.expect(o.etag, unittest.equals('foo')); |
| 87 unittest.expect(o.hidden, unittest.isTrue); | 87 unittest.expect(o.hidden, unittest.isTrue); |
| 88 unittest.expect(o.id, unittest.equals('foo')); | 88 unittest.expect(o.id, unittest.equals('foo')); |
| 89 unittest.expect(o.kind, unittest.equals('foo')); | 89 unittest.expect(o.kind, unittest.equals('foo')); |
| 90 checkUnnamed567(o.links); | 90 checkUnnamed1086(o.links); |
| 91 unittest.expect(o.notes, unittest.equals('foo')); | 91 unittest.expect(o.notes, unittest.equals('foo')); |
| 92 unittest.expect(o.parent, unittest.equals('foo')); | 92 unittest.expect(o.parent, unittest.equals('foo')); |
| 93 unittest.expect(o.position, unittest.equals('foo')); | 93 unittest.expect(o.position, unittest.equals('foo')); |
| 94 unittest.expect(o.selfLink, unittest.equals('foo')); | 94 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 95 unittest.expect(o.status, unittest.equals('foo')); | 95 unittest.expect(o.status, unittest.equals('foo')); |
| 96 unittest.expect(o.title, unittest.equals('foo')); | 96 unittest.expect(o.title, unittest.equals('foo')); |
| 97 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 97 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
| 98 } | 98 } |
| 99 buildCounterTask--; | 99 buildCounterTask--; |
| 100 } | 100 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 121 unittest.expect(o.etag, unittest.equals('foo')); | 121 unittest.expect(o.etag, unittest.equals('foo')); |
| 122 unittest.expect(o.id, unittest.equals('foo')); | 122 unittest.expect(o.id, unittest.equals('foo')); |
| 123 unittest.expect(o.kind, unittest.equals('foo')); | 123 unittest.expect(o.kind, unittest.equals('foo')); |
| 124 unittest.expect(o.selfLink, unittest.equals('foo')); | 124 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 125 unittest.expect(o.title, unittest.equals('foo')); | 125 unittest.expect(o.title, unittest.equals('foo')); |
| 126 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 126 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
| 127 } | 127 } |
| 128 buildCounterTaskList--; | 128 buildCounterTaskList--; |
| 129 } | 129 } |
| 130 | 130 |
| 131 buildUnnamed568() { | 131 buildUnnamed1087() { |
| 132 var o = new core.List<api.TaskList>(); | 132 var o = new core.List<api.TaskList>(); |
| 133 o.add(buildTaskList()); | 133 o.add(buildTaskList()); |
| 134 o.add(buildTaskList()); | 134 o.add(buildTaskList()); |
| 135 return o; | 135 return o; |
| 136 } | 136 } |
| 137 | 137 |
| 138 checkUnnamed568(core.List<api.TaskList> o) { | 138 checkUnnamed1087(core.List<api.TaskList> o) { |
| 139 unittest.expect(o, unittest.hasLength(2)); | 139 unittest.expect(o, unittest.hasLength(2)); |
| 140 checkTaskList(o[0]); | 140 checkTaskList(o[0]); |
| 141 checkTaskList(o[1]); | 141 checkTaskList(o[1]); |
| 142 } | 142 } |
| 143 | 143 |
| 144 core.int buildCounterTaskLists = 0; | 144 core.int buildCounterTaskLists = 0; |
| 145 buildTaskLists() { | 145 buildTaskLists() { |
| 146 var o = new api.TaskLists(); | 146 var o = new api.TaskLists(); |
| 147 buildCounterTaskLists++; | 147 buildCounterTaskLists++; |
| 148 if (buildCounterTaskLists < 3) { | 148 if (buildCounterTaskLists < 3) { |
| 149 o.etag = "foo"; | 149 o.etag = "foo"; |
| 150 o.items = buildUnnamed568(); | 150 o.items = buildUnnamed1087(); |
| 151 o.kind = "foo"; | 151 o.kind = "foo"; |
| 152 o.nextPageToken = "foo"; | 152 o.nextPageToken = "foo"; |
| 153 } | 153 } |
| 154 buildCounterTaskLists--; | 154 buildCounterTaskLists--; |
| 155 return o; | 155 return o; |
| 156 } | 156 } |
| 157 | 157 |
| 158 checkTaskLists(api.TaskLists o) { | 158 checkTaskLists(api.TaskLists o) { |
| 159 buildCounterTaskLists++; | 159 buildCounterTaskLists++; |
| 160 if (buildCounterTaskLists < 3) { | 160 if (buildCounterTaskLists < 3) { |
| 161 unittest.expect(o.etag, unittest.equals('foo')); | 161 unittest.expect(o.etag, unittest.equals('foo')); |
| 162 checkUnnamed568(o.items); | 162 checkUnnamed1087(o.items); |
| 163 unittest.expect(o.kind, unittest.equals('foo')); | 163 unittest.expect(o.kind, unittest.equals('foo')); |
| 164 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 164 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 165 } | 165 } |
| 166 buildCounterTaskLists--; | 166 buildCounterTaskLists--; |
| 167 } | 167 } |
| 168 | 168 |
| 169 buildUnnamed569() { | 169 buildUnnamed1088() { |
| 170 var o = new core.List<api.Task>(); | 170 var o = new core.List<api.Task>(); |
| 171 o.add(buildTask()); | 171 o.add(buildTask()); |
| 172 o.add(buildTask()); | 172 o.add(buildTask()); |
| 173 return o; | 173 return o; |
| 174 } | 174 } |
| 175 | 175 |
| 176 checkUnnamed569(core.List<api.Task> o) { | 176 checkUnnamed1088(core.List<api.Task> o) { |
| 177 unittest.expect(o, unittest.hasLength(2)); | 177 unittest.expect(o, unittest.hasLength(2)); |
| 178 checkTask(o[0]); | 178 checkTask(o[0]); |
| 179 checkTask(o[1]); | 179 checkTask(o[1]); |
| 180 } | 180 } |
| 181 | 181 |
| 182 core.int buildCounterTasks = 0; | 182 core.int buildCounterTasks = 0; |
| 183 buildTasks() { | 183 buildTasks() { |
| 184 var o = new api.Tasks(); | 184 var o = new api.Tasks(); |
| 185 buildCounterTasks++; | 185 buildCounterTasks++; |
| 186 if (buildCounterTasks < 3) { | 186 if (buildCounterTasks < 3) { |
| 187 o.etag = "foo"; | 187 o.etag = "foo"; |
| 188 o.items = buildUnnamed569(); | 188 o.items = buildUnnamed1088(); |
| 189 o.kind = "foo"; | 189 o.kind = "foo"; |
| 190 o.nextPageToken = "foo"; | 190 o.nextPageToken = "foo"; |
| 191 } | 191 } |
| 192 buildCounterTasks--; | 192 buildCounterTasks--; |
| 193 return o; | 193 return o; |
| 194 } | 194 } |
| 195 | 195 |
| 196 checkTasks(api.Tasks o) { | 196 checkTasks(api.Tasks o) { |
| 197 buildCounterTasks++; | 197 buildCounterTasks++; |
| 198 if (buildCounterTasks < 3) { | 198 if (buildCounterTasks < 3) { |
| 199 unittest.expect(o.etag, unittest.equals('foo')); | 199 unittest.expect(o.etag, unittest.equals('foo')); |
| 200 checkUnnamed569(o.items); | 200 checkUnnamed1088(o.items); |
| 201 unittest.expect(o.kind, unittest.equals('foo')); | 201 unittest.expect(o.kind, unittest.equals('foo')); |
| 202 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 202 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 203 } | 203 } |
| 204 buildCounterTasks--; | 204 buildCounterTasks--; |
| 205 } | 205 } |
| 206 | 206 |
| 207 | 207 |
| 208 main() { | 208 main() { |
| 209 unittest.group("obj-schema-TaskLinks", () { | 209 unittest.group("obj-schema-TaskLinks", () { |
| 210 unittest.test("to-json--from-json", () { | 210 unittest.test("to-json--from-json", () { |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 res.update(arg_request, arg_tasklist, arg_task).then(unittest.expectAsync(
((api.Task response) { | 1038 res.update(arg_request, arg_tasklist, arg_task).then(unittest.expectAsync(
((api.Task response) { |
| 1039 checkTask(response); | 1039 checkTask(response); |
| 1040 }))); | 1040 }))); |
| 1041 }); | 1041 }); |
| 1042 | 1042 |
| 1043 }); | 1043 }); |
| 1044 | 1044 |
| 1045 | 1045 |
| 1046 } | 1046 } |
| 1047 | 1047 |
| OLD | NEW |