public async void DeletePrediction() { using (MockContext context = MockContext.Start(this.GetType())) { HttpMockServer.Initialize(this.GetType(), "DeletePrediction", RecorderMode); using (var project = CreateTrainedImageClassificationProject()) { ICustomVisionTrainingClient client = BaseTests.GetTrainingClient(); var token = new PredictionQueryToken() { OrderBy = "Newest", }; var result = client.QueryPredictionsAsync(project.ProjectId, token).Result; Assert.NotEqual(0, result.Results.Count); await client.DeletePredictionAsync(project.ProjectId, new Guid[] { result.Results[result.Results.Count - 1].Id }); } } }