public static void StopAzureAfterAllTestsIfWasDown() { if (!_wasUp) { AzureStorageEmulatorManager.StopStorageEmulator(); } else { // Leave as it was before testing... } }
public static void StartAzureBeforeAllTestsIfNotUp(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context) { if (!AzureStorageEmulatorManager.IsProcessStarted()) { AzureStorageEmulatorManager.StartStorageEmulator(); _wasUp = false; } else { _wasUp = true; } }
public static void StopAzureAfterAllTestsIfWasDown() { if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("StorageConnectionString"))) { return; } if (!_wasUp) { AzureStorageEmulatorManager.StopStorageEmulator(); } else { // Leave as it was before testing... } }
public static void StartAzureBeforeAllTestsIfNotUp(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context) { if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("StorageConnectionString"))) { return; } if (!AzureStorageEmulatorManager.IsProcessStarted()) { AzureStorageEmulatorManager.StartStorageEmulator(); _wasUp = false; } else { _wasUp = true; } }