Package org.azd.test.attachments
Class ResultAttachmentRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.test.attachments.ResultAttachmentRequestBuilder
Provides functionality to work with Test result attachments Api.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorsConstructorDescriptionResultAttachmentRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel) Attach a file to a test result.create
(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel, int testSubResultId) Attach a file to a test result.createAsync
(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel) Attach a file to a test result.createAsync
(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel, int testSubResultId) Attach a file to a test result.getAsZip
(int attachmentId, int runId, int testCaseResultId) Download a test result attachment by its ID.getAsZip
(int attachmentId, int runId, int testCaseResultId, int testSubResultId) Download a test sub result attachment by its ID.getAsZipAsync
(int attachmentId, int runId, int testCaseResultId) Download a test result attachment by its ID.getAsZipAsync
(int attachmentId, int runId, int testCaseResultId, int testSubResultId) Download a test sub result attachment by its ID.getContent
(int attachmentId, int runId, int testCaseResultId) Download a test result attachment by its ID.getContent
(int attachmentId, int runId, int testCaseResultId, int testSubResultId) Download a test sub result attachment by its ID.getContentAsync
(int attachmentId, int runId, int testCaseResultId) Download a test result attachment by its ID.getContentAsync
(int attachmentId, int runId, int testCaseResultId, int testSubResultId) Download a test sub result attachment by its ID.list
(int runId, int testCaseResultId, int testSubResultId) Get list of test sub result attachments.listAsync
(int runId, int testCaseResultId, int testSubResultId) Get list of test sub result attachments.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
ResultAttachmentRequestBuilder
public ResultAttachmentRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
createAsync
public CompletableFuture<TestAttachmentReference> createAsync(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel) throws AzDException Attach a file to a test result.- Parameters:
runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.requestModel
- Request body to create the result attachment.- Returns:
- TestAttachmentReference
TestAttachmentReference
- Throws:
AzDException
- Default Api exception handler.
-
createAsync
public CompletableFuture<TestAttachmentReference> createAsync(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel, int testSubResultId) throws AzDException Attach a file to a test result.- Parameters:
runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.requestModel
- Request body to create the result attachment.testSubResultId
- ID of the test sub results against which attachment has to be uploaded.- Returns:
- TestAttachmentReference
TestAttachmentReference
- Throws:
AzDException
- Default Api exception handler.
-
getContentAsync
public CompletableFuture<InputStream> getContentAsync(int attachmentId, int runId, int testCaseResultId) throws AzDException Download a test result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.- Returns:
- InputStream of attachment content.
- Throws:
AzDException
- Default Api exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(int attachmentId, int runId, int testCaseResultId) throws AzDException Download a test result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.- Returns:
- InputStream of attachment content as zip file.
- Throws:
AzDException
- Default Api exception handler.
-
getContentAsync
public CompletableFuture<InputStream> getContentAsync(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException Download a test sub result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.testSubResultId
- ID of the test sub result whose attachment has to be downloaded- Returns:
- InputStream of attachment content.
- Throws:
AzDException
- Default Api exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException Download a test sub result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.testSubResultId
- ID of the test sub result whose attachment has to be downloaded- Returns:
- InputStream of attachment content as zip file.
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
public CompletableFuture<TestAttachments> listAsync(int runId, int testCaseResultId, int testSubResultId) throws AzDException Get list of test sub result attachments.- Parameters:
runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.testSubResultId
- ID of the test sub result whose attachment has to be downloaded- Returns:
- List of TestAttachment
TestAttachments
- Throws:
AzDException
- Default Api exception handler.
-
create
public TestAttachmentReference create(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel) throws AzDException Attach a file to a test result.- Parameters:
runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.requestModel
- Request body to create the result attachment.- Returns:
- TestAttachmentReference
TestAttachmentReference
- Throws:
AzDException
- Default Api exception handler.
-
create
public TestAttachmentReference create(int runId, int testCaseResultId, TestAttachmentRequestModel requestModel, int testSubResultId) throws AzDException Attach a file to a test result.- Parameters:
runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.requestModel
- Request body to create the result attachment.testSubResultId
- ID of the test sub results against which attachment has to be uploaded.- Returns:
- TestAttachmentReference
TestAttachmentReference
- Throws:
AzDException
- Default Api exception handler.
-
getContent
public InputStream getContent(int attachmentId, int runId, int testCaseResultId) throws AzDException Download a test result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.- Returns:
- InputStream of attachment content.
- Throws:
AzDException
- Default Api exception handler.
-
getAsZip
Download a test result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.- Returns:
- InputStream of attachment content as zip file.
- Throws:
AzDException
- Default Api exception handler.
-
getContent
public InputStream getContent(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException Download a test sub result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.testSubResultId
- ID of the test sub result whose attachment has to be downloaded- Returns:
- InputStream of attachment content.
- Throws:
AzDException
- Default Api exception handler.
-
getAsZip
public InputStream getAsZip(int attachmentId, int runId, int testCaseResultId, int testSubResultId) throws AzDException Download a test sub result attachment by its ID.- Parameters:
attachmentId
- ID of the test result attachment to be downloaded.runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.testSubResultId
- ID of the test sub result whose attachment has to be downloaded- Returns:
- InputStream of attachment content as zip file.
- Throws:
AzDException
- Default Api exception handler.
-
list
public TestAttachments list(int runId, int testCaseResultId, int testSubResultId) throws AzDException Get list of test sub result attachments.- Parameters:
runId
- ID of the test run that contains the result.testCaseResultId
- ID of the test result against which attachment has to be uploaded.testSubResultId
- ID of the test sub result whose attachment has to be downloaded- Returns:
- List of TestAttachment
TestAttachments
- Throws:
AzDException
- Default Api exception handler.
-