public void DetectImageUrl() { string testImageUrl = "https://raw.githubusercontent.com/Microsoft/Cognitive-CustomVision-Windows/master/Samples/Images/Test/test_image.jpg"; using (MockContext context = MockContext.Start(this.GetType())) { HttpMockServer.Initialize(this.GetType(), "DetectImageUrl", RecorderMode); ICustomVisionPredictionClient client = GetPredictionClientClient(); ImageUrl url = new ImageUrl(testImageUrl); ImagePrediction results = client.DetectImageUrl(ObjectDetectionProjectId, ObjDetectionPublishedName, url); ValidateObjDetectionResults(results); } }