@@ -39,6 +39,7 @@ void main() {
39
39
commands.stream,
40
40
responses.add,
41
41
notifyingLogger: notifyingLogger,
42
+ dartDefines: const < String > [],
42
43
);
43
44
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'daemon.version' });
44
45
final Map <String , dynamic > response = await responses.stream.firstWhere (_notEvent);
@@ -56,6 +57,7 @@ void main() {
56
57
commands.stream,
57
58
responses.add,
58
59
notifyingLogger: notifyingLogger,
60
+ dartDefines: const < String > [],
59
61
);
60
62
printError ('daemon.logMessage test' );
61
63
final Map <String , dynamic > response = await responses.stream.firstWhere ((Map <String , dynamic > map) {
@@ -83,6 +85,7 @@ void main() {
83
85
responses.add,
84
86
notifyingLogger: notifyingLogger,
85
87
logToStdout: true ,
88
+ dartDefines: const < String > [],
86
89
);
87
90
printStatus ('daemon.logMessage test' );
88
91
// Service the event loop.
@@ -103,6 +106,7 @@ void main() {
103
106
commands.stream,
104
107
responses.add,
105
108
notifyingLogger: notifyingLogger,
109
+ dartDefines: const < String > [],
106
110
);
107
111
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'daemon.shutdown' });
108
112
return daemon.onExit.then <void >((int code) async {
@@ -112,16 +116,13 @@ void main() {
112
116
});
113
117
114
118
testUsingContext ('app.restart without an appId should report an error' , () async {
115
- final DaemonCommand command = DaemonCommand ();
116
- applyMocksToCommand (command);
117
-
118
119
final StreamController <Map <String , dynamic >> commands = StreamController <Map <String , dynamic >>();
119
120
final StreamController <Map <String , dynamic >> responses = StreamController <Map <String , dynamic >>();
120
121
daemon = Daemon (
121
122
commands.stream,
122
123
responses.add,
123
- daemonCommand: command,
124
124
notifyingLogger: notifyingLogger,
125
+ dartDefines: const < String > [],
125
126
);
126
127
127
128
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'app.restart' });
@@ -133,16 +134,13 @@ void main() {
133
134
});
134
135
135
136
testUsingContext ('ext.flutter.debugPaint via service extension without an appId should report an error' , () async {
136
- final DaemonCommand command = DaemonCommand ();
137
- applyMocksToCommand (command);
138
-
139
137
final StreamController <Map <String , dynamic >> commands = StreamController <Map <String , dynamic >>();
140
138
final StreamController <Map <String , dynamic >> responses = StreamController <Map <String , dynamic >>();
141
139
daemon = Daemon (
142
140
commands.stream,
143
141
responses.add,
144
- daemonCommand: command,
145
142
notifyingLogger: notifyingLogger,
143
+ dartDefines: const < String > [],
146
144
);
147
145
148
146
commands.add (< String , dynamic > {
@@ -160,16 +158,13 @@ void main() {
160
158
});
161
159
162
160
testUsingContext ('app.stop without appId should report an error' , () async {
163
- final DaemonCommand command = DaemonCommand ();
164
- applyMocksToCommand (command);
165
-
166
161
final StreamController <Map <String , dynamic >> commands = StreamController <Map <String , dynamic >>();
167
162
final StreamController <Map <String , dynamic >> responses = StreamController <Map <String , dynamic >>();
168
163
daemon = Daemon (
169
164
commands.stream,
170
165
responses.add,
171
- daemonCommand: command,
172
166
notifyingLogger: notifyingLogger,
167
+ dartDefines: const < String > [],
173
168
);
174
169
175
170
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'app.stop' });
@@ -187,6 +182,7 @@ void main() {
187
182
commands.stream,
188
183
responses.add,
189
184
notifyingLogger: notifyingLogger,
185
+ dartDefines: const < String > [],
190
186
);
191
187
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'device.getDevices' });
192
188
final Map <String , dynamic > response = await responses.stream.firstWhere (_notEvent);
@@ -203,6 +199,7 @@ void main() {
203
199
commands.stream,
204
200
responses.add,
205
201
notifyingLogger: notifyingLogger,
202
+ dartDefines: const < String > [],
206
203
);
207
204
final MockPollingDeviceDiscovery discoverer = MockPollingDeviceDiscovery ();
208
205
daemon.deviceDomain.addDeviceDiscoverer (discoverer);
@@ -221,9 +218,10 @@ void main() {
221
218
final StreamController <Map <String , dynamic >> commands = StreamController <Map <String , dynamic >>();
222
219
final StreamController <Map <String , dynamic >> responses = StreamController <Map <String , dynamic >>();
223
220
daemon = Daemon (
224
- commands.stream,
225
- responses.add,
226
- notifyingLogger: notifyingLogger,
221
+ commands.stream,
222
+ responses.add,
223
+ notifyingLogger: notifyingLogger,
224
+ dartDefines: const < String > [],
227
225
);
228
226
229
227
final MockPollingDeviceDiscovery discoverer = MockPollingDeviceDiscovery ();
@@ -247,16 +245,13 @@ void main() {
247
245
});
248
246
249
247
testUsingContext ('emulator.launch without an emulatorId should report an error' , () async {
250
- final DaemonCommand command = DaemonCommand ();
251
- applyMocksToCommand (command);
252
-
253
248
final StreamController <Map <String , dynamic >> commands = StreamController <Map <String , dynamic >>();
254
249
final StreamController <Map <String , dynamic >> responses = StreamController <Map <String , dynamic >>();
255
250
daemon = Daemon (
256
251
commands.stream,
257
252
responses.add,
258
- daemonCommand: command,
259
253
notifyingLogger: notifyingLogger,
254
+ dartDefines: const < String > [],
260
255
);
261
256
262
257
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'emulator.launch' });
@@ -274,6 +269,7 @@ void main() {
274
269
commands.stream,
275
270
responses.add,
276
271
notifyingLogger: notifyingLogger,
272
+ dartDefines: const < String > [],
277
273
);
278
274
commands.add (< String , dynamic > {'id' : 0 , 'method' : 'emulator.getEmulators' });
279
275
final Map <String , dynamic > response = await responses.stream.firstWhere (_notEvent);
0 commit comments