public async void DeleteImages() { using (MockContext context = MockContext.Start(this.GetType().Name)) { HttpMockServer.Initialize(this.GetType().Name, "DeleteImages", RecorderMode); ICustomVisionTrainingClient client = GetTrainingClient(); var projectId = (await client.CreateProjectAsync(projName)).Id; string imageUrl = "https://raw.githubusercontent.com/Microsoft/Cognitive-CustomVision-Windows/master/Samples/Images/Test/test_image.jpg"; var urlImages = new ImageUrlCreateEntry[] { new ImageUrlCreateEntry(imageUrl) }; var result = client.CreateImagesFromUrlsAsync(projectId, new ImageUrlCreateBatch(urlImages)).Result; Assert.True(result.IsBatchSuccessful); Assert.Equal(1, result.Images.Count); await client.DeleteImagesAsync(projectId, new string[] { result.Images[0].Image.Id.ToString() }); await client.DeleteProjectAsync(projectId); } }