internal void TriggerBadApiUrlException() { try { string apiUrl = _serviceUri.AbsoluteUri.Substring(0, _serviceUri.AbsoluteUri.Length - 3); _logWriter("Test bad XML exception triggered by GUI URL" + apiUrl); var request = new StartVirtualMachineRequest(); request.Parameters["id"] = "invalid-machine-id"; _client.StartVirtualMachine(request); System.Diagnostics.Debug.Fail("Test should have triggered CloudStackException"); } catch (CloudStackException cex) { _logWriter(cex.Message); _logWriter("Test PASSED"); } }