MultipartFormDataHelperTest - Unit Tests#44807
MultipartFormDataHelperTest - Unit Tests#44807markmunozmsft wants to merge 1 commit intoAzure:mainfrom
Conversation
|
Thank you for your contribution @markmunozmsft! We will review the pull request and get back to you soon. |
|
API change check API changes are not detected in this pull request. |
| return name.replace("\n", "%0A").replace("\r", "%0D").replace("\"", "%22"); | ||
| } | ||
|
|
||
| public String getBoundary() { |
There was a problem hiding this comment.
Unfortunately, this class is generated, so next time we run our code generation tools, this method will probably disappear.
There was a problem hiding this comment.
But there is really no other way to test this, as we need to know ahead of time the value of the boundary. I think that instead of adding this method, it might be better to make the construtor in line ~65 package private. So changing from:
private MultipartFormDataHelper(RequestOptions requestOptions, String boundary) ->
MultipartFormDataHelper(RequestOptions requestOptions, String boundary)
There was a problem hiding this comment.
By doing this you can inject an expect boundary value against which you can assert in your tests.
| } | ||
|
|
||
| @Test | ||
| public void testDeserializeAudioTranscription() throws IOException { |
There was a problem hiding this comment.
I think this test should probably be moved to under the models package, as it doesn't seem to relate to the MultipartFormDataHelper class.
That being said, are we exercising here anything that isn't exercised in the testGetAudioTranscription* tests in the NonAzureOpenAISyncClient and all the other files?
|
I think that the CI failures relate to add a new |
Unit Tests added to
MultipartFormDataHelperTest