public void GetSupportedFileFormatsTest() { var request = new GetSupportedFormatsRequest(); var response = SignatureApi.GetSupportedFormats(request); Assert.IsTrue(response.Formats.Count > 0); foreach (var entry in response.Formats) { Assert.IsNotEmpty(entry.Extension); Assert.IsNotEmpty(entry.FileFormat); } }
/// <summary> /// Lists supported file formats. /// </summary> /// <param name="request">Request. <see cref="GetSupportedFormatsRequest" /></param> /// <returns><see cref="FormatCollection"/></returns> public FormatCollection GetSupportedFormats(GetSupportedFormatsRequest request) { // create path and map variables var resourcePath = this.configuration.GetApiRootUrl() + "/signature/formats"; resourcePath = Regex .Replace(resourcePath, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); var response = this.apiInvoker.InvokeApi( resourcePath, "GET", null, null, null); if (response != null) { return((FormatCollection)SerializationHelper.Deserialize(response, typeof(FormatCollection))); } return(null); }