Skip to content

Commit 2047579

Browse files
chore: adopt http/parameters/basic (Azure#49592)
1 parent af491fc commit 2047579

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System.Threading.Tasks;
5+
using NUnit.Framework;
6+
using Parameters.Basic;
7+
using Parameters.Basic.Models;
8+
9+
namespace TestProjects.Spector.Tests.Http.Parameters.Basic
10+
{
11+
public class BasicParametersTests : SpectorTestBase
12+
{
13+
[SpectorTest]
14+
public Task ExplicitBodySimple() => Test(async (host) =>
15+
{
16+
var client = new BasicClient(host, null).GetExplicitBodyClient();
17+
var body = new User("foo");
18+
var response = await client.SimpleAsync(body);
19+
Assert.AreEqual(204, response.Status);
20+
});
21+
22+
[SpectorTest]
23+
public Task ImplicitBodySimple() => Test(async (host) =>
24+
{
25+
var client = new BasicClient(host, null).GetImplicitBodyClient();
26+
var name = "foo";
27+
var response = await client.SimpleAsync(name);
28+
Assert.AreEqual(204, response.Status);
29+
});
30+
}
31+
}

0 commit comments

Comments
 (0)