public async void IndivReactively(PlayReadyIndividualizationServiceRequest indivRequest) { TestLogger.LogMessage("Enter Indiv.IndivReactively()"); Exception exception = null; try { _serviceRequest = indivRequest; SerivceRequestStatistics.IncIndivCount(); TestLogger.LogMessage("Begin indiv service request..."); await indivRequest.BeginServiceRequest(); } catch (Exception ex) { TestLogger.LogMessage("Saving exception.."); exception = ex; } finally { IndivServiceRequestCompleted(indivRequest, exception); } TestLogger.LogMessage("Leave Indiv.IndivReactively()"); }
public void Test_VerifyServiceRequestStatistics(string strIndivCount, string strLACount) { TestLogger.LogMessage("Enter Test_VerifyServiceRequestStatistics()"); uint?indivCount = ActionParamConvertToUint(strIndivCount); uint?LACount = ActionParamConvertToUint(strLACount); bool bTestActionResult = true; if (indivCount.HasValue) { uint actualIndivCount = SerivceRequestStatistics.GetIndivCount(); TestLogger.LogMessage("Actual indiv count = " + actualIndivCount); if (indivCount.Value != actualIndivCount) { bTestActionResult = false; } } if (LACount.HasValue) { uint ActualLicenseAcquisitionCount = SerivceRequestStatistics.GetLicenseAcquisitionCount(); TestLogger.LogMessage("Actual license acquisition count = " + ActualLicenseAcquisitionCount); if (LACount.Value != ActualLicenseAcquisitionCount) { bTestActionResult = false; } } TestActionFinished(bTestActionResult, null); TestLogger.LogMessage("Leave Test_VerifyServiceRequestStatistics()"); }
public void Test_ResetServiceRequestStatistics() { TestLogger.LogMessage("Enter Test_ResetServiceRequestStatistics()"); SerivceRequestStatistics.Reset(); TestActionFinished(true, null); TestLogger.LogMessage("Leave Test_ResetServiceRequestStatistics()"); }
async public void AcquireLicenseReactively(IPlayReadyLicenseAcquisitionServiceRequest licenseRequest) { TestLogger.LogImportantMessage("Enter LicenseAcquisition.AcquireLicenseReactively()"); Exception exception = null; try { _serviceRequest = licenseRequest; ConfigureServiceRequest(); SerivceRequestStatistics.IncLicenseAcquisitionCount(); TestLogger.LogMessage("ChallengeCustomData = " + licenseRequest.ChallengeCustomData); if (RequestConfigData.ManualEnabling) { TestLogger.LogMessage("Manually posting the request..."); HttpHelper httpHelper = new HttpHelper(licenseRequest); await httpHelper.GenerateChallengeAndProcessResponse(); } else { TestLogger.LogImportantMessage("Begin license acquisition service request..."); await licenseRequest.BeginServiceRequest(); } TestLogger.LogMessage("Post-LicenseAcquisition Values:"); TestLogger.LogMessage("DomainServiceId = " + licenseRequest.DomainServiceId.ToString()); DumpContentHeaderValues(licenseRequest.ContentHeader); } catch (Exception ex) { TestLogger.LogMessage("Saving exception.. " + ex.ToString()); exception = ex; } finally { if (exception == null) { TestLogger.LogMessage("ResponseCustomData = " + licenseRequest.ResponseCustomData); } LAServiceRequestCompleted(licenseRequest, exception); } TestLogger.LogImportantMessage("Leave LicenseAcquisition.AcquireLicenseReactively()"); }