File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Parameters/Basic Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments