public void CommandOperator_DefaultValues_SetsNothing() { var expected = new UpdateAzureVmCommand(); Command actual = expected; Assert.That(actual.Parameters, Is.Empty); }
private static void AttachAzureDrive(IPowershellExecutor executor, VirtualMachine virtualMachine, string serviceName, string dataDiskName) { var getAzureVm = new GetAzureVmCommand { Name = virtualMachine.Name, ServiceName = serviceName }; var addAzureDataDisk = new AddAzureDataDiskCommand { Import = true, DiskName = dataDiskName, LogicalUnitNumber = 0 }; var updateAzureVm = new UpdateAzureVmCommand(); var result = executor.Execute(getAzureVm, addAzureDataDisk, updateAzureVm); }
private static void DetachDiskFromVirtualMachine(IPowershellExecutor executor, VirtualMachine virtualMachine, string serviceName, int logicalUnitNumber) { var getAzureVmCommand = new GetAzureVmCommand { ServiceName = serviceName, Name = virtualMachine.Name }; var removeAzureDataDiskCommand = new RemoveAzureDataDiskCommand { LogicalUnitNumber = logicalUnitNumber }; var updateAzureVmCommand = new UpdateAzureVmCommand(); executor.Execute(getAzureVmCommand, removeAzureDataDiskCommand, updateAzureVmCommand); }