Updated to .Net Core 8

This commit is contained in:
UltimateCoder
2024-11-26 00:18:00 +01:00
parent e8842f8991
commit 2b0b04ec7b
28 changed files with 269 additions and 504 deletions
@@ -11,10 +11,8 @@ using Xunit;
namespace CoreIntegrationTests.Infrastructure
{
public abstract partial class MongoDbDocumentTestBase<T>
where T : TestDoc, new()
public abstract partial class MongoDbDocumentTestBase<T> where T : TestDoc, new()
{
private readonly MongoDbTestFixture<T, Guid> _fixture;
protected MongoDbDocumentTestBase(MongoDbTestFixture<T, Guid> fixture)
@@ -14,8 +14,7 @@ using Xunit;
namespace CoreIntegrationTests.Infrastructure
{
public abstract partial class MongoDbDocumentTestBase<T> :
IClassFixture<MongoDbTestFixture<T, Guid>>
where T : TestDoc, new()
IClassFixture<MongoDbTestFixture<T, Guid>> where T : TestDoc, new()
{
#region Update One
@@ -40,7 +40,7 @@ namespace CoreIntegrationTests.Infrastructure
public class TestDoc : Document
{
public TestDoc()
protected TestDoc()
{
Version = 2;
Nested = new Nested
@@ -12,7 +12,7 @@ namespace CoreIntegrationTests.Infrastructure
public class TestTKeyRepository<TKey> : BaseMongoRepository<TKey>, ITestRepository<TKey> where TKey : IEquatable<TKey>
{
const string connectionString = "mongodb://localhost:27017/MongoDbTests";
const string connectionString = "mongodb://test:Test123!@10.0.3.4:27017/MongoDbTests";
private static readonly ITestRepository<TKey> _instance = new TestTKeyRepository<TKey>(connectionString);
/// <inheritdoc />
private TestTKeyRepository(string connectionString) : base(connectionString)
@@ -44,7 +44,7 @@ namespace CoreIntegrationTests.Infrastructure
public sealed class TestRepository : BaseMongoRepository, ITestRepository
{
const string connectionString = "mongodb://localhost:27017";
const string connectionString = "mongodb://test:Test123!@10.0.3.4:27017";
private static readonly ITestRepository _instance = new TestRepository(connectionString, "MongoDbTests");
// Explicit static constructor to tell C# compiler