public SimulatorRunner(IFileSystem fileSystem, ICakeEnvironment environment, IProcessRunner processRunner,
                        IToolLocator tools, ICakeLog log, SimulatorSettings settings) : base(fileSystem, environment, processRunner, tools, settings)
 {
     _log          = log;
     _simCtlRunner = new SimCtlRunner(fileSystem, environment, processRunner, tools, log, new SimCtlSettings());
     _xcrunRunner  = new XCRunRunner(fileSystem, environment, processRunner, tools, log, new XCRunSettings());
 }
        public static void ShutdownAllAppleSimulators(this ICakeContext context, SimCtlSettings settings)
        {
            ThrowIfNotRunningOnMac(context);

            var runner = new SimCtlRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools,
                                          context.Log, settings);

            runner.ShutdownSimulators();
        }
        public static IReadOnlyList <AppleSimulator> ListAppleSimulators(this ICakeContext context,
                                                                         SimCtlSettings settings)
        {
            ThrowIfNotRunningOnMac(context);

            var runner = new SimCtlRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools,
                                          context.Log, settings);

            return(runner.ListSimulators());
        }
        public static void EraseAppleSimulator(this ICakeContext context, string deviceIdentifier,
                                               SimCtlSettings settings)
        {
            if (string.IsNullOrWhiteSpace(deviceIdentifier))
            {
                throw new ArgumentException(nameof(deviceIdentifier));
            }

            ThrowIfNotRunningOnMac(context);

            var runner = new SimCtlRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools,
                                          context.Log, settings);

            runner.EraseSimulator(deviceIdentifier);
        }
        public static TestResults TestiOSApplication(this ICakeContext context, string deviceIdentifier,
                                                     string appIdentifier, SimCtlSettings settings)
        {
            if (string.IsNullOrWhiteSpace(deviceIdentifier))
            {
                throw new ArgumentException(nameof(deviceIdentifier));
            }

            ThrowIfNotRunningOnMac(context);

            var runner = new SimCtlRunner(context.FileSystem, context.Environment, context.ProcessRunner,
                                          context.Tools, context.Log, settings);

            return(runner.TestApplication(deviceIdentifier, appIdentifier));
        }
Exemple #6
0
        protected override void RunTool()
        {
            var runner = new SimCtlRunner(FileSystem, Environment, ProcessRunner, Tools, Log, Settings);

            ToolResult = runner.ListDeviceTypes();
        }