public void StopEmulators(out string warning) { var runTool = new CsRun(AzureTool.GetComputeEmulatorDirectory()); runTool.StopComputeEmulator(); var storageEmulator = new StorageEmulator(AzureTool.GetStorageEmulatorDirectory()); storageEmulator.Stop(); //for now, errors related with storage emulator are treated as non-fatal warning = storageEmulator.Error; }
public void Stop_StorageEmulatorInstalled_UseCorrectCommand() { // Setup string testFolder = @"c:\sample-path"; string expectedCommand = Path.Combine(testFolder, Resources.StorageEmulatorExe); StorageEmulator emulator = new StorageEmulator(@"c:\sample-path"); Mock<ProcessHelper> commandRunner = new Mock<ProcessHelper>(); commandRunner.Setup(p => p.StartAndWaitForProcess(expectedCommand, Resources.StopStorageEmulatorCommandArgument)); emulator.CommandRunner = commandRunner.Object; // Execute emulator.Stop(); // Assert commandRunner.Verify(); }
public void Stop_StorageEmulatorInstalled_UseCorrectCommand() { // Setup string testFolder = @"c:\sample-path"; string expectedCommand = Path.Combine(testFolder, Resources.StorageEmulatorExe); StorageEmulator emulator = new StorageEmulator(@"c:\sample-path"); Mock <ProcessHelper> commandRunner = new Mock <ProcessHelper>(); commandRunner.Setup(p => p.StartAndWaitForProcess(expectedCommand, Resources.StopStorageEmulatorCommandArgument)); emulator.CommandRunner = commandRunner.Object; // Execute emulator.Stop(); // Assert commandRunner.Verify(); }