public void ImageGet() { Configure(); var img = imageApi.FindById(imageId); Assert.AreEqual(imageId, img.Id); }
protected override void BeginProcessing() { try { var imageApi = new ImageApi(Utilities.Configuration); if (!string.IsNullOrEmpty(this.ImageId)) { var image = imageApi.FindById(this.ImageId, depth: 5); WriteObject(image); } else { var images = imageApi.FindAll(depth: 5); WriteObject(images.Items); } } catch (Exception ex) { WriteError(new ErrorRecord(ex, "", ErrorCategory.NotSpecified, null)); } }