Beispiel #1
0
 public void GetRequesterWorkerStatistic()
 {
     GetRequesterWorkerStatisticRequest req = new GetRequesterWorkerStatisticRequest();
     req.TimePeriod = TimePeriod.LifeToDate;
     req.Statistic = RequesterStatistic.PercentKnownAnswersCorrect;
     req.WorkerId = WorkerID;
     GetStatisticResult result = TestUtil.Client.GetRequesterWorkerStatistic(req);
     Assert.IsNotNull(result.DataPoint);
     Assert.AreEqual(TimePeriod.LifeToDate, result.TimePeriod);
     Assert.AreEqual(RequesterStatistic.PercentKnownAnswersCorrect, result.Statistic);
     Assert.AreEqual(WorkerID, result.WorkerId);
 }
Beispiel #2
0
 /// <summary>
 /// Gets a worker-specific statistic
 /// </summary>
 /// <param name="request">A <see cref="GetRequesterWorkerStatisticRequest"/> instance containing the request parameters</param>
 /// <returns>A <see cref="GetStatisticResult"/> instance containing the statistic</returns>
 public GetStatisticResult GetRequesterWorkerStatistic(GetRequesterWorkerStatisticRequest request)
 {
     GetRequesterWorkerStatisticResponse response = (GetRequesterWorkerStatisticResponse)this.SendRequest(request);
     return response.GetStatisticResult[0];
 }