Skip to content

Commit af06e34

Browse files
add xunit (#132)
* add xunit * add logo * Update modules/xunit/index.md Co-authored-by: Manuel de la Peña <[email protected]> --------- Co-authored-by: Manuel de la Peña <[email protected]>
1 parent ddd7451 commit af06e34

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

modules/xunit/index.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Xunit
3+
categories:
4+
- test-framework
5+
docs:
6+
- id: dotnet
7+
url: https://www.nuget.org/packages/Testcontainers.Xunit
8+
maintainer: core
9+
example: |
10+
```csharp
11+
public sealed partial class RedisContainerTest(ITestOutputHelper testOutputHelper)
12+
: ContainerTest<RedisBuilder, RedisContainer>(testOutputHelper)
13+
{
14+
protected override RedisBuilder Configure(RedisBuilder builder)
15+
{
16+
// 👇 Configure your container instance here.
17+
return builder.WithImage("redis:7.0");
18+
}
19+
}
20+
```
21+
installation: |
22+
```bash
23+
dotnet add package Testcontainers.Xunit
24+
```
25+
description: |
26+
The Testcontainers.Xunit package simplifies writing tests with containers in xUnit.net. By leveraging xUnit.net's shared context, this package automates the setup and teardown of test resources, creating and disposing of containers as needed. This reduces repetitive code and avoids common patterns that developers would otherwise need to implement repeatedly.
27+
28+
You can read full example and docs here: https://dotnet.testcontainers.org/test_frameworks/xunit_net/
29+
---

modules/xunit/logo.svg

+5
Loading

0 commit comments

Comments
 (0)