public void SetAzureServiceProjectTestsLocationValid()
{
string[] locations = { "West US", "East US", "East Asia", "North Europe" };
foreach (string item in locations)
{
using (FileSystemHelper files = new FileSystemHelper(this))
{
// Create new empty settings file
//
PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath);
ServiceSettings settings = new ServiceSettings();
mockCommandRuntime = new MockCommandRuntime();
setServiceProjectCmdlet.CommandRuntime = mockCommandRuntime;
settings.Save(paths.Settings);
settings = setServiceProjectCmdlet.SetAzureServiceProjectProcess(item, null, null, paths.Settings);
// Assert location is changed
//
Assert.Equal<string>(item, settings.Location);
ServiceSettings actualOutput = mockCommandRuntime.OutputPipeline[0] as ServiceSettings;
Assert.Equal<string>(item, settings.Location);
}
}
}