use of io.flutter.run.FlutterDevice in project flutter-intellij by flutter.
the class LaunchCommandsTest method producesCorrectCommandLineInProfileMode.
@Test
public void producesCorrectCommandLineInProfileMode() throws ExecutionException {
final BazelFields fields = setupBazelFields();
final FlutterDevice device = FlutterDevice.getTester();
final GeneralCommandLine launchCommand = fields.getLaunchCommand(projectFixture.getProject(), device, RunMode.PROFILE);
final List<String> expectedCommandLine = new ArrayList<>();
expectedCommandLine.add(platformize("/workspace/scripts/flutter-run.sh"));
expectedCommandLine.add("--profile");
expectedCommandLine.add("--machine");
expectedCommandLine.add("-d");
expectedCommandLine.add("flutter-tester");
expectedCommandLine.add("--devtools-server-address=http://http://localhost:1234");
expectedCommandLine.add("bazel_target");
assertThat(launchCommand.getCommandLineList(null), equalTo(expectedCommandLine));
}
use of io.flutter.run.FlutterDevice in project flutter-intellij by flutter.
the class LaunchCommandsTest method producesCorrectCommandLineWithIosDevice.
@Test
public void producesCorrectCommandLineWithIosDevice() throws ExecutionException {
final BazelFields fields = setupBazelFields();
final FlutterDevice device = new FlutterDevice("ios-tester", "ios device", "ios", false);
final GeneralCommandLine launchCommand = fields.getLaunchCommand(projectFixture.getProject(), device, RunMode.RUN);
final List<String> expectedCommandLine = new ArrayList<>();
expectedCommandLine.add(platformize("/workspace/scripts/flutter-run.sh"));
expectedCommandLine.add("--machine");
expectedCommandLine.add("-d");
expectedCommandLine.add("ios-tester");
expectedCommandLine.add("--devtools-server-address=http://http://localhost:1234");
expectedCommandLine.add("bazel_target");
assertThat(launchCommand.getCommandLineList(null), equalTo(expectedCommandLine));
}
use of io.flutter.run.FlutterDevice in project flutter-intellij by flutter.
the class LaunchCommandsTest method producesCorrectCommandLineWithBazelArgs.
@Test
public void producesCorrectCommandLineWithBazelArgs() throws ExecutionException {
final BazelFields fields = setupBazelFields("bazel_target", "--define=bazel_args", null, false);
final FlutterDevice device = FlutterDevice.getTester();
final GeneralCommandLine launchCommand = fields.getLaunchCommand(projectFixture.getProject(), device, RunMode.RUN);
final List<String> expectedCommandLine = new ArrayList<>();
expectedCommandLine.add(platformize("/workspace/scripts/flutter-run.sh"));
expectedCommandLine.add("--bazel-options=--define=bazel_args");
expectedCommandLine.add("--machine");
expectedCommandLine.add("-d");
expectedCommandLine.add("flutter-tester");
expectedCommandLine.add("--devtools-server-address=http://http://localhost:1234");
expectedCommandLine.add("bazel_target");
assertThat(launchCommand.getCommandLineList(null), equalTo(expectedCommandLine));
}
use of io.flutter.run.FlutterDevice in project flutter-intellij by flutter.
the class LaunchCommandsTest method producesCorrectCommandLineInDebugMode.
@Test
public void producesCorrectCommandLineInDebugMode() throws ExecutionException {
final BazelFields fields = setupBazelFields();
final FlutterDevice device = FlutterDevice.getTester();
final GeneralCommandLine launchCommand = fields.getLaunchCommand(projectFixture.getProject(), device, RunMode.DEBUG);
final List<String> expectedCommandLine = new ArrayList<>();
expectedCommandLine.add(platformize("/workspace/scripts/flutter-run.sh"));
expectedCommandLine.add("--machine");
expectedCommandLine.add("--start-paused");
expectedCommandLine.add("-d");
expectedCommandLine.add("flutter-tester");
expectedCommandLine.add("--devtools-server-address=http://http://localhost:1234");
expectedCommandLine.add("bazel_target");
assertThat(launchCommand.getCommandLineList(null), equalTo(expectedCommandLine));
}
use of io.flutter.run.FlutterDevice in project flutter-intellij by flutter.
the class LaunchCommandsTest method producesCorrectCommandLineWithIosSimulator.
@Test
public void producesCorrectCommandLineWithIosSimulator() throws ExecutionException {
final BazelFields fields = setupBazelFields();
final FlutterDevice device = new FlutterDevice("ios-tester", "ios device", "ios", true);
final GeneralCommandLine launchCommand = fields.getLaunchCommand(projectFixture.getProject(), device, RunMode.RUN);
final List<String> expectedCommandLine = new ArrayList<>();
expectedCommandLine.add(platformize("/workspace/scripts/flutter-run.sh"));
expectedCommandLine.add("--machine");
expectedCommandLine.add("-d");
expectedCommandLine.add("ios-tester");
expectedCommandLine.add("--devtools-server-address=http://http://localhost:1234");
expectedCommandLine.add("bazel_target");
assertThat(launchCommand.getCommandLineList(null), equalTo(expectedCommandLine));
}
Aggregations