public void SetHostnameTest() { VirtualMachineRepository vmr = new VirtualMachineRepository(); VirtualMachine vm = vmr.GetAllRegisteredVirtualMachines().GetEnumerator().Current; // TODO: Initialize to an appropriate value RegisteredVirtualMachineService target = new RegisteredVirtualMachineService(vm); // TODO: Initialize to an appropriate value string hostname = string.Empty; // TODO: Initialize to an appropriate value target.SetHostname(hostname); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
private void SetIPHostname(RegisteredVirtualMachineService service, bool retry = true) { try { System.Threading.Thread.Sleep(12 * 1000); service.SetHostname(VM.Hostname); System.Threading.Thread.Sleep(8 * 1000); service.SetIP(VM.IP.ToString()); System.Threading.Thread.Sleep(8 * 1000); } catch (Exception ex) { if (retry) SetIPHostname(service, false); else new SchedulerInfo("Error setting IP or hostname of new VM, will need to be manually set but will continue", ex).LogElmah(); } }