public async Task GetChangeListAsync_SpecificType_ReturnsChangeList() { IChangesApi apiUnderTest = new ChangesApi(_clientWithNoApiKey); ChangeList changeList = await apiUnderTest.GetChangeListAsync(ChangeType.TV, "26/07/2020", "25/07/2020", 1, _userApiKey); Assert.IsNotNull(changeList); Assert.IsNotEmpty(changeList.Results); }
public void PutChangesImagesStreamTest() { PutChangesImagesStreamRequest request = new PutChangesImagesStreamRequest(GetComparisonRequest("source.docx", new List <string> { "target.docx" })); var response = ChangesApi.PutChangesImagesStream(request); Assert.IsInstanceOf <System.IO.Stream>(response, "response is System.IO.Stream"); }
public void PostChangesTest() { PostChangesRequest request = new PostChangesRequest(GetComparisonRequest("source.docx", new List <string> { "target.docx" })); var response = ChangesApi.PostChanges(request); Assert.IsInstanceOf <List <ComparisonChange> >(response, "response is List<ComparisonChange>"); }
public void PutChangesImagesTest() { string outPath = "result.docx"; PutChangesImagesRequest request = new PutChangesImagesRequest(GetComparisonRequest("source.docx", new List <string> { "target.docx" }), outPath); var response = ChangesApi.PutChangesImages(request); Assert.IsInstanceOf <List <Link> >(response, "response is List<Link>"); }
public TestsSetup() { var comparisonConfig = new Configuration { AuthType = AuthType.OAuth2, AppSid = _appSid, AppKey = _appKey, ApiBaseUrl = _apiBaseUrl }; ComparisonApi = new ComparisonApi(comparisonConfig); ChangesApi = new ChangesApi(comparisonConfig); var storageConfig = new Configuration { AuthType = AuthType.OAuth2, AppSid = _appSid, AppKey = _appKey, ApiBaseUrl = _apiBaseUrl }; StorageApi = new StorageApi(storageConfig); }