docs(dotnet): use modern namespace syntax for api testing snippets (#17271)
This commit is contained in:
parent
c7367b7065
commit
ab4876242f
|
|
@ -39,8 +39,7 @@ using Microsoft.Playwright.NUnit;
|
|||
using Microsoft.Playwright;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace PlaywrightTests
|
||||
{
|
||||
namespace PlaywrightTests;
|
||||
|
||||
public class TestGitHubAPI : PlaywrightTest
|
||||
{
|
||||
|
|
@ -76,7 +75,6 @@ namespace PlaywrightTests
|
|||
await Request.DisposeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Write tests
|
||||
|
|
@ -91,8 +89,7 @@ using Microsoft.Playwright.NUnit;
|
|||
using Microsoft.Playwright;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace PlaywrightTests
|
||||
{
|
||||
namespace PlaywrightTests;
|
||||
|
||||
[TestFixture]
|
||||
public class TestGitHubAPI : PlaywrightTest
|
||||
|
|
@ -161,7 +158,6 @@ namespace PlaywrightTests
|
|||
|
||||
// ...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Setup and teardown
|
||||
|
|
@ -217,8 +213,7 @@ using Microsoft.Playwright.NUnit;
|
|||
using Microsoft.Playwright;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace PlaywrightTests
|
||||
{
|
||||
namespace PlaywrightTests;
|
||||
|
||||
[TestFixture]
|
||||
public class TestGitHubAPI : PlaywrightTest
|
||||
|
|
@ -334,7 +329,6 @@ namespace PlaywrightTests
|
|||
Assert.True(resp.Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Prepare server state via API calls
|
||||
|
|
|
|||
Loading…
Reference in a new issue