public SetRoleVMSize ( Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo paths, string roleName, string VMSize ) : void | ||
paths | Microsoft.WindowsAzure.Management.CloudService.Model.ServicePathInfo | The service paths |
roleName | string | The name of the role to change its vm size |
VMSize | string | The new role vm size |
리턴 | void |
public void SetAzureVMSizeProcessNegativeRoleInstanceFail() { string roleName = "WebRole1"; using (FileSystemHelper files = new FileSystemHelper(this)) { AzureService service = new AzureService(files.RootPath, serviceName, null); Testing.AssertThrows<ArgumentException>(() => service.SetRoleVMSize(service.Paths, roleName, string.Empty), string.Format(Resources.InvalidVMSize, roleName)); } }
public void SetAzureVMSizeProcessTestsEmptyRoleNameFail() { using (FileSystemHelper files = new FileSystemHelper(this)) { AzureService service = new AzureService(files.RootPath, serviceName, null); Testing.AssertThrows<ArgumentException>(() => service.SetRoleVMSize(service.Paths, string.Empty, RoleSize.Large.ToString()), string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.RoleName)); } }
public void SetAzureVMSizeProcessTestsRoleNameDoesNotExistFail() { string roleName = "WebRole1"; using (FileSystemHelper files = new FileSystemHelper(this)) { AzureService service = new AzureService(files.RootPath, serviceName, null); Testing.AssertThrows<ArgumentException>(() => service.SetRoleVMSize(service.Paths, roleName, RoleSize.Medium.ToString()), string.Format(Resources.RoleNotFoundMessage, roleName)); } }
public void SetAzureVMSizeProcessTestsPHPRoleNameDoesNotExistServiceContainsWorkerRoleFail() { string roleName = "WorkerRole1"; string invalidRoleName = "foo"; using (FileSystemHelper files = new FileSystemHelper(this)) { AzureService service = new AzureService(files.RootPath, serviceName, null); service.AddWorkerRole(Data.PHPWorkerRoleScaffoldingPath, roleName, 1); Testing.AssertThrows<ArgumentException>(() => service.SetRoleVMSize(service.Paths, invalidRoleName, RoleSize.Large.ToString()), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); } }