mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
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 Microsoft.Playwright;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace PlaywrightTests
|
namespace PlaywrightTests;
|
||||||
{
|
|
||||||
|
|
||||||
public class TestGitHubAPI : PlaywrightTest
|
public class TestGitHubAPI : PlaywrightTest
|
||||||
{
|
{
|
||||||
@ -76,7 +75,6 @@ namespace PlaywrightTests
|
|||||||
await Request.DisposeAsync();
|
await Request.DisposeAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Write tests
|
### Write tests
|
||||||
@ -91,8 +89,7 @@ using Microsoft.Playwright.NUnit;
|
|||||||
using Microsoft.Playwright;
|
using Microsoft.Playwright;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace PlaywrightTests
|
namespace PlaywrightTests;
|
||||||
{
|
|
||||||
|
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestGitHubAPI : PlaywrightTest
|
public class TestGitHubAPI : PlaywrightTest
|
||||||
@ -161,7 +158,6 @@ namespace PlaywrightTests
|
|||||||
|
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup and teardown
|
### Setup and teardown
|
||||||
@ -217,8 +213,7 @@ using Microsoft.Playwright.NUnit;
|
|||||||
using Microsoft.Playwright;
|
using Microsoft.Playwright;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace PlaywrightTests
|
namespace PlaywrightTests;
|
||||||
{
|
|
||||||
|
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestGitHubAPI : PlaywrightTest
|
public class TestGitHubAPI : PlaywrightTest
|
||||||
@ -334,7 +329,6 @@ namespace PlaywrightTests
|
|||||||
Assert.True(resp.Ok);
|
Assert.True(resp.Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Prepare server state via API calls
|
## Prepare server state via API calls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user