diff --git a/test/CadlRanchProjects.Tests/parameters-spread.cs b/test/CadlRanchProjects.Tests/parameters-spread.cs index e65dc223fb7..ea64aeed0ea 100644 --- a/test/CadlRanchProjects.Tests/parameters-spread.cs +++ b/test/CadlRanchProjects.Tests/parameters-spread.cs @@ -24,6 +24,34 @@ public Task Parameters_Spread_Model_spreadAsRequestBody() => Test(async (host) = Assert.AreEqual(204, response.Status); }); + [Test] + public Task Parameters_Spread_Model_spreadCompositeRequest() => Test(async (host) => + { + Response response = await new SpreadClient(host, null).GetModelClient().SpreadCompositeRequestAsync("foo", "bar", new BodyParameter("foo")); + Assert.AreEqual(204, response.Status); + }); + + [Test] + public Task Parameters_Spread_Model_spreadCompositeRequestMix() => Test(async (host) => + { + Response response = await new SpreadClient(host, null).GetModelClient().SpreadCompositeRequestMixAsync("foo", "bar", "foo"); + Assert.AreEqual(204, response.Status); + }); + + [Test] + public Task Parameters_Spread_Model_spreadCompositeRequestOnlyWithBody() => Test(async (host) => + { + Response response = await new SpreadClient(host, null).GetModelClient().SpreadCompositeRequestOnlyWithBodyAsync(new BodyParameter("foo")); + Assert.AreEqual(204, response.Status); + }); + + [Test] + public Task Parameters_Spread_Model_spreadCompositeRequestOnlyWithoutBody() => Test(async (host) => + { + Response response = await new SpreadClient(host, null).GetModelClient().SpreadCompositeRequestWithoutBodyAsync("foo", "bar"); + Assert.AreEqual(204, response.Status); + }); + [Test] public Task Parameters_Spread_Alias_spreadAsRequestBody() => Test(async (host) => { diff --git a/test/CadlRanchProjects.Tests/payload-multipart.cs b/test/CadlRanchProjects.Tests/payload-multipart.cs index dfadc3eeb90..4f358a0641f 100644 --- a/test/CadlRanchProjects.Tests/payload-multipart.cs +++ b/test/CadlRanchProjects.Tests/payload-multipart.cs @@ -43,6 +43,37 @@ public Task Payload_Multipart_FormData_BinaryArrayParts() => Test(async (host) = Assert.AreEqual(204, response.Status); }); + [Test] + public Task Payload_Multipart_FormData_CheckFileNameAndContentType() => Test(async (host) => + { + Address addressX = new Address("X"); + var profileImage = System.IO.File.OpenRead(SampleJpgPath); + var pictures = new Stream[] + { + System.IO.File.OpenRead(SamplePngPath), + System.IO.File.OpenRead(SamplePngPath) + }; + ComplexPartsRequest data = new ComplexPartsRequest("123", addressX, profileImage, pictures); + var response = await new MultiPartClient(host, null).GetFormDataClient().FileArrayAndBasicAsync(data); + Assert.AreEqual(204, response.Status); + }); + + [Test] + public Task Payload_Multipart_FormData_FileArrayAndBasic() => Test(async (host) => + { + Address addressX = new Address("X"); + var profileImage = System.IO.File.OpenRead(SampleJpgPath); + var pictures = new Stream[] + { + System.IO.File.OpenRead(SamplePngPath), + System.IO.File.OpenRead(SamplePngPath) + }; + ComplexPartsRequest data = new ComplexPartsRequest("123", addressX, profileImage, pictures); + var response = await new MultiPartClient(host, null).GetFormDataClient().FileArrayAndBasicAsync(data); + Assert.AreEqual(204, response.Status); + }); + + [Test] public Task Payload_Multipart_FormData_Anonymous_Model() => Test(async (host) => {