Unverified Commit 6728cf34 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] remove more mocks from runner tests (#84312)

parent 67a57eb9
...@@ -143,7 +143,6 @@ final Uri testUri = Uri.parse('foo://bar'); ...@@ -143,7 +143,6 @@ final Uri testUri = Uri.parse('foo://bar');
void main() { void main() {
Testbed testbed; Testbed testbed;
MockFlutterDevice mockFlutterDevice; MockFlutterDevice mockFlutterDevice;
MockVMService mockVMService;
FakeDevFS mockDevFS; FakeDevFS mockDevFS;
ResidentRunner residentRunner; ResidentRunner residentRunner;
FakeDevice mockDevice; FakeDevice mockDevice;
...@@ -168,7 +167,6 @@ void main() { ...@@ -168,7 +167,6 @@ void main() {
}); });
mockFlutterDevice = MockFlutterDevice(); mockFlutterDevice = MockFlutterDevice();
mockDevice = FakeDevice(); mockDevice = FakeDevice();
mockVMService = MockVMService();
mockDevFS = FakeDevFS(); mockDevFS = FakeDevFS();
// FlutterDevice Mocks. // FlutterDevice Mocks.
when(mockFlutterDevice.updateDevFS( when(mockFlutterDevice.updateDevFS(
...@@ -2123,12 +2121,11 @@ void main() { ...@@ -2123,12 +2121,11 @@ void main() {
io.CompressionOptions compression, io.CompressionOptions compression,
Device device, Device device,
Logger logger, Logger logger,
}) async => mockVMService, }) async => FakeVmServiceHost(requests: <VmServiceExpectation>[]).vmService,
})); }));
testUsingContext('Failed DDS start outputs error message', () => testbed.run(() async { testUsingContext('Failed DDS start outputs error message', () => testbed.run(() async {
// See https://github.com/flutter/flutter/issues/72385 for context. // See https://github.com/flutter/flutter/issues/72385 for context.
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[]);
final FakeDevice mockDevice = FakeDevice() final FakeDevice mockDevice = FakeDevice()
..dds = DartDevelopmentService(); ..dds = DartDevelopmentService();
ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) { ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) {
...@@ -2165,7 +2162,7 @@ void main() { ...@@ -2165,7 +2162,7 @@ void main() {
io.CompressionOptions compression, io.CompressionOptions compression,
Device device, Device device,
Logger logger, Logger logger,
}) async => mockVMService, }) async => FakeVmServiceHost(requests: <VmServiceExpectation>[]).vmService,
})); }));
testUsingContext('nextPlatform moves through expected platforms', () { testUsingContext('nextPlatform moves through expected platforms', () {
...@@ -2193,8 +2190,6 @@ void main() { ...@@ -2193,8 +2190,6 @@ void main() {
} }
class MockFlutterDevice extends Mock implements FlutterDevice {} class MockFlutterDevice extends Mock implements FlutterDevice {}
class MockVMService extends Mock implements FlutterVmService {}
class MockDevFS extends Mock implements DevFS {}
class MockResidentCompiler extends Mock implements ResidentCompiler {} class MockResidentCompiler extends Mock implements ResidentCompiler {}
class FakeDartDevelopmentServiceException implements dds.DartDevelopmentServiceException { class FakeDartDevelopmentServiceException implements dds.DartDevelopmentServiceException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment