/
dundich
/
sa
Обзор
Документация
Войти
/
dundich
/
sa
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Samples/Storage.Tests/ClientShould.cs
38 строк
848 B
krivchenko-kv
added s3 client
21 апр 2025, 17:32
21 апр 2025, 17:32
f4326a2
Код
Авторство
О чём код?
namespace Storage.Tests; public sealed class ClientShould(StorageFixture fixture) : IClassFixture<StorageFixture> { private readonly CancellationToken _ct = CancellationToken.None; private readonly S3Client _client = fixture.S3Client; [Fact] public void DeserializeSettingsJson() { var expected = fixture.Settings; var json = JsonSerializer.Serialize(expected); var actual = JsonSerializer.Deserialize<S3Settings>(json); actual.Should().BeEquivalentTo(expected); } [Fact] public void HasValidInfo() { _client .Bucket .Should().Be(fixture.Settings.Bucket); } [Fact] public Task ThrowIfDisposed() { var client = TestHelper.CloneClient(fixture, null, new HttpClient()); client.Dispose(); return client .Invoking(c => c.CreateBucket(_ct)) .Should().ThrowExactlyAsync<ObjectDisposedException>(); } }