Skip to content

Commit 0d9c943

Browse files
committed
chore: Move usings to global file
1 parent 063649f commit 0d9c943

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

tests/Testcontainers.Platform.Linux.Tests/PauseUnpauseTest.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using Docker.DotNet;
2-
using Xunit.Sdk;
3-
41
namespace Testcontainers.Tests;
52

63
public sealed class PauseUnpauseTest : IAsyncLifetime
@@ -31,13 +28,10 @@ await _container.UnpauseAsync()
3128
.ConfigureAwait(true);
3229
Assert.Equal(TestcontainersStates.Running, _container.State);
3330
}
34-
31+
3532
[Fact]
36-
public async Task Unpauses_NotPaused_ContainerSuccessfully()
33+
public Task UnpausingRunningContainerThrowsDockerApiException()
3734
{
38-
var thrown = await Assert.ThrowsAsync<DockerApiException>(async () => await _container.UnpauseAsync().ConfigureAwait(true));
39-
40-
Assert.Equal(HttpStatusCode.InternalServerError, thrown.StatusCode);
41-
Assert.Equal($"Docker API responded with status code=InternalServerError, response={{\"message\":\"Container {_container.Id} is not paused\"}}\n", thrown.Message);
35+
return Assert.ThrowsAsync<DockerApiException>(() => _container.UnpauseAsync());
4236
}
4337
}

tests/Testcontainers.Platform.Linux.Tests/Usings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
global using System.Text;
99
global using System.Threading;
1010
global using System.Threading.Tasks;
11+
global using Docker.DotNet;
1112
global using Docker.DotNet.Models;
1213
global using DotNet.Testcontainers;
1314
global using DotNet.Testcontainers.Builders;

0 commit comments

Comments
 (0)