public void Start_StorageEmulatorNotInstalled_GetWarning() { // Setup StorageEmulator emulator = new StorageEmulator(null); Mock <ProcessHelper> commandRunner = new Mock <ProcessHelper>(); // Execute emulator.Start(); // Assert Assert.Equal(Resources.WarningWhenStorageEmulatorIsMissing, emulator.Error); }
public void Start_StorageEmulatorNotInstalled_GetWarning() { // Setup StorageEmulator emulator = new StorageEmulator(null); Mock<ProcessHelper> commandRunner = new Mock<ProcessHelper>(); // Execute emulator.Start(); // Assert Assert.AreEqual(Resources.WarningWhenStorageEmulatorIsMissing, emulator.Error); }
/// <summary> /// Starts azure emulator for this service. /// </summary> /// <remarks>This methods removes all deployments already in the emulator.</remarks> /// <param name="launchBrowser">Switch to control opening a browser for web roles.</param> /// <param name="standardOutput">Output result from csrun.exe</param> /// <param name="standardError">Error result from csrun.exe</param> public void StartEmulators(bool launchBrowser, ComputeEmulatorMode mode, out string roleInformation, out string warning) { var runTool = new CsRun(AzureTool.GetComputeEmulatorDirectory()); runTool.StartEmulator(Paths.LocalPackage, Paths.LocalConfiguration, launchBrowser, mode); roleInformation = runTool.RoleInformation; var storageEmulator = new StorageEmulator(AzureTool.GetStorageEmulatorDirectory()); storageEmulator.Start(); //for now, errors related with storage emulator are treated as non-fatal warning = storageEmulator.Error; }
public void Start_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.StartStorageEmulatorCommandArgument)); emulator.CommandRunner = commandRunner.Object; // Execute emulator.Start(); // Assert commandRunner.Verify(); }
public void Start_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.StartStorageEmulatorCommandArgument)); emulator.CommandRunner = commandRunner.Object; // Execute emulator.Start(); // Assert commandRunner.Verify(); }
/// <summary> /// Starts azure emulator for this service. /// </summary> /// <remarks>This methods removes all deployments already in the emulator.</remarks> /// <param name="launchBrowser">Switch to control opening a browser for web roles.</param> /// <param name="standardOutput">Output result from csrun.exe</param> /// <param name="standardError">Error result from csrun.exe</param> public void StartEmulators(bool launchBrowser, ComputeEmulatorMode mode , out string roleInformation, out string warning) { var runTool = new CsRun(AzureTool.GetComputeEmulatorDirectory()); runTool.StartEmulator(Paths.LocalPackage, Paths.LocalConfiguration, launchBrowser, mode); roleInformation = runTool.RoleInformation; var storageEmulator = new StorageEmulator(AzureTool.GetStorageEmulatorDirectory()); storageEmulator.Start(); //for now, errors related with storage emulator are treated as non-fatal warning = storageEmulator.Error; }
public void FixtureSetUp() { StorageEmulator.Start(); }