public static IDictionary <string, object> getStopTestProperties(StopTestParams stopTestParams) { IDictionary <string, object> properties = new Dictionary <string, object>(); properties[FORCE_STOP] = stopTestParams.ForceStop; if (stopTestParams.QualityStatus != null) { properties[QUALITY_STATUS] = stopTestParams.QualityStatus; } return(properties); }
/// <summary> /// Stop a test. </summary> /// <param name="stopTestParams"> </param> /// <exception cref="ODataException"> </exception> /// <exception cref="GeneralSecurityException"> </exception> /// <exception cref="IOException"> </exception> /// <exception cref="URISyntaxException"> </exception> /// <exception cref="NeotysAPIException"> </exception> public void StopTest(StopTestParams stopTestParams) { if (!Enabled) { return; } IDictionary <string, object> properties = RuntimeApiUtils.getStopTestProperties(stopTestParams); properties[RuntimeApiUtils.API_KEY] = apiKey; try { CreateEntity(RuntimeApiUtils.STOP_TEST, properties); } catch (Microsoft.OData.Core.ODataException oDataException) { throw new NeotysAPIException(oDataException); } }