Skip to content

Commit

Permalink
Add the refine step in the testing for multipart.
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasKenneth committed May 2, 2024
1 parent a246745 commit f7bea3a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2509,7 +2509,7 @@ public void WritesRequestGeneratorContentTypeQuotes()
Assert.Contains("\"application/json; profile=\\\"CamelCase\\\"\"", result);
}
[Fact]
public void WritesRequestGeneratorBodyForMultipart()
public async Task WritesRequestGeneratorBodyForMultipart()
{
setup();
method.Kind = CodeMethodKind.RequestGenerator;
Expand All @@ -2522,9 +2522,10 @@ public void WritesRequestGeneratorBodyForMultipart()
IsExternal = true
};
method.RequestBodyContentType = "multipart/form-data";
await _refiner.Refine(root, new CancellationToken(false));
languageWriter.Write(method);
var result = stringWriter.ToString();
Assert.Contains("MultipartBody $body", result);
Assert.Contains("MultiPartBody $body", result);
Assert.Contains("$requestInfo->setContentFromParsable($this->requestAdapter, \"multipart/form-data\", $body);", result);
}
}

0 comments on commit f7bea3a

Please sign in to comment.