-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* make redis db fixture public + tests * public redis extensions now use interface
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Ephemerally.Redis.Xunit; | ||
using Shouldly; | ||
|
||
namespace Ephemerally.Redis.Tests.Fixtures; | ||
|
||
public class PooledEphemeralRedisDatabaseFixtureTests6 : PooledEphemeralRedisDatabaseFixtureTests<RedisInstanceFixture6>; | ||
|
||
public class PooledEphemeralRedisDatabaseFixtureTests7 : PooledEphemeralRedisDatabaseFixtureTests<RedisInstanceFixture7>; | ||
|
||
[Collection(RedisTestCollection.Name)] | ||
public abstract class PooledEphemeralRedisDatabaseFixtureTests<TRedisFixture> : IAsyncLifetime | ||
where TRedisFixture : class, IRedisInstanceFixture, new() | ||
{ | ||
// Arrange | ||
private readonly PooledEphemeralRedisDatabaseFixture<TRedisFixture> _fixture = new(); | ||
|
||
[RedisFact] | ||
public async Task Fixture_database_should_not_be_null() | ||
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test_cosmos
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test_cosmos
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test_cosmos
Check warning on line 18 in tests/Ephemerally.Redis.Tests/Fixtures/PooledEphemeralRedisDatabaseFixtureTests.cs GitHub Actions / build_and_test_cosmos
|
||
{ | ||
// Act | ||
var database = _fixture.Database; | ||
|
||
// Assert | ||
database.ShouldNotBeNull(); | ||
} | ||
|
||
#region IAsyncLifetime Members | ||
|
||
public Task InitializeAsync() => _fixture.InitializeAsync(); | ||
|
||
public Task DisposeAsync() => _fixture.DisposeAsync(); | ||
|
||
#endregion | ||
} |