Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b69cc9ea75 | |||
| 68ce5b04d9 | |||
| 6c33537060 | |||
| 00bd61e220 | |||
| c5240aea9a | |||
| a748189f84 | |||
| 6ce49c378d | |||
| c45b0a49d7 | |||
| e5f65e8f19 | |||
| 720e09bdbc | |||
| 2b0b04ec7b | |||
| e8842f8991 | |||
| a54b702841 |
@@ -0,0 +1,33 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
|
||||
env:
|
||||
PACKAGE_VERSION: ${GITHUB_REF/refs\/tags\/v/}
|
||||
PACKAGE_OWNER: ${{ github.repository_owner }}
|
||||
PACKAGE_NAME: MongoDbGenericRepository.${{ env.PACKAGE_VERSION }}.nupkg
|
||||
PACKAGE_SOURCE: https://git.home.cuco.li/api/packages/${{ env.PACKAGE_OWNER }}/nuget/index.json
|
||||
PACKAGE_TOKEN: ${{ secrets.PACKAGE_PUSH_TOKEN }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.x.x'
|
||||
- name: Verify commit exists in origin/master
|
||||
run: |
|
||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
||||
git branch --remote --contains | grep origin/master
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release /p:Version=${{ env.PACKAGE_VERSION }}
|
||||
- name: Test
|
||||
run: dotnet test --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --no-build
|
||||
- name: Pack
|
||||
run: dotnet pack --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --no-build --output .
|
||||
- name: Push
|
||||
run: dotnet nuget push ${{ env.PACKAGE_NAME }} --source ${{ env.PACKAGE_SOURCE }} --api-key ${{ env.PACKAGE_TOKEN }}
|
||||
@@ -0,0 +1,25 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9][0-9][0-9]"
|
||||
|
||||
env:
|
||||
PACKAGE_VERSION: ${GITHUB_REF/refs\/tags\/v/}
|
||||
PACKAGE_OWNER: ${{ github.repository_owner }}
|
||||
PACKAGE_NAME: MongoDbGenericRepository.${{ env.PACKAGE_VERSION }}.nupkg
|
||||
PACKAGE_SOURCE: https://git.home.cuco.li/api/packages/${{ env.PACKAGE_OWNER }}/nuget/index.json
|
||||
PACKAGE_TOKEN: ${{ secrets.PACKAGE_PUSH_TOKEN }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.x.x'
|
||||
- name: Pack
|
||||
run: dotnet pack --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --output .
|
||||
- name: Push
|
||||
run: dotnet nuget push ${{ env.PACKAGE_NAME }} --source ${{ env.PACKAGE_SOURCE }} --api-key ${{ env.PACKAGE_TOKEN }}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=169433
|
||||
-->
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<add name="MongoDbTests" connectionString="mongodb://localhost:27017" />
|
||||
</connectionStrings>
|
||||
</configuration>
|
||||
@@ -1,29 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="2.1.2" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.25.0" />
|
||||
<PackageReference Include="xunit" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.5.0">
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.9.2" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.9.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="App.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>warnings</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<AnalysisLevel>latest</AnalysisLevel>
|
||||
<LangVersion>10</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoFixture" Version="4.18.0" />
|
||||
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="6.11.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="Moq" Version="4.18.4" />
|
||||
<PackageReference Include="xunit" Version="2.5.0" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.5.0">
|
||||
<PackageReference Include="AutoFixture" Version="4.18.1" />
|
||||
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.1" />
|
||||
<PackageReference Include="FluentAssertions" Version="6.12.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageReference Include="Moq" Version="4.20.72" />
|
||||
<PackageReference Include="xunit" Version="2.9.2" />
|
||||
<PackageReference Include="xunit.runner.console" Version="2.9.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -7,7 +7,7 @@ using MongoDB.Driver;
|
||||
public static class FilterDefinitionExtensions
|
||||
{
|
||||
public static string RenderToJson<TDocument>(this FilterDefinition<TDocument> filter)
|
||||
=> filter.Render(BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(), BsonSerializer.SerializerRegistry).ToJson();
|
||||
=> filter.Render(new RenderArgs<TDocument>(BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(), BsonSerializer.SerializerRegistry)).ToJson();
|
||||
|
||||
public static bool EquivalentTo<TDocument>(this FilterDefinition<TDocument> filter, FilterDefinition<TDocument> other)
|
||||
=> filter.RenderToJson() == other.RenderToJson();
|
||||
|
||||
@@ -59,9 +59,7 @@ public static class IndexExtensions
|
||||
|
||||
private static string RenderIndexModelKeys<TDocument>(IndexKeysDefinition<TDocument> keys)
|
||||
{
|
||||
var indexModelRendered = keys.Render(
|
||||
BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(),
|
||||
BsonSerializer.SerializerRegistry);
|
||||
var indexModelRendered = keys.Render(new RenderArgs<TDocument>(BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(), BsonSerializer.SerializerRegistry));
|
||||
|
||||
var result = indexModelRendered.ToString();
|
||||
return result.Replace(" ", "");
|
||||
|
||||
@@ -8,13 +8,9 @@ public static class UpdateDefinitionExtensions
|
||||
{
|
||||
public static bool EquivalentTo<TDocument>(this UpdateDefinition<TDocument> update, UpdateDefinition<TDocument> expected)
|
||||
{
|
||||
var renderedUpdate = update.Render(
|
||||
BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(),
|
||||
BsonSerializer.SerializerRegistry);
|
||||
var renderedUpdate = update.Render(new RenderArgs<TDocument>(BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(), BsonSerializer.SerializerRegistry));
|
||||
|
||||
var renderedExpected = expected.Render(
|
||||
BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(),
|
||||
BsonSerializer.SerializerRegistry);
|
||||
var renderedExpected = expected.Render(new RenderArgs<TDocument>(BsonSerializer.SerializerRegistry.GetSerializer<TDocument>(), BsonSerializer.SerializerRegistry) );
|
||||
|
||||
return renderedUpdate.Equals(renderedExpected);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
http://go.microsoft.com/fwlink/?LinkId=169433
|
||||
-->
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<add name="MongoDbTests" connectionString="mongodb://localhost:27017" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using IntegrationTests.Infrastructure;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDbGenericRepository.Attributes;
|
||||
using MongoDbGenericRepository.Models;
|
||||
using System;
|
||||
using IntegrationTests.Infrastructure;
|
||||
using TestDoc = IntegrationTests.Infrastructure.TestDoc;
|
||||
|
||||
namespace IntegrationTests
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using IntegrationTests.Infrastructure;
|
||||
using MongoDbGenericRepository.Models;
|
||||
using TestDoc = IntegrationTests.Infrastructure.TestDoc;
|
||||
|
||||
namespace IntegrationTests
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using IntegrationTests.Infrastructure;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework.Internal;
|
||||
using TestDoc = IntegrationTests.Infrastructure.TestDoc;
|
||||
|
||||
namespace IntegrationTests
|
||||
{
|
||||
|
||||
@@ -41,8 +41,7 @@ namespace IntegrationTests.Infrastructure
|
||||
[OneTimeSetUp]
|
||||
public void Init()
|
||||
{
|
||||
var connectionString = ConfigurationManager.ConnectionStrings["MongoDbTests"].ConnectionString;
|
||||
SUT = new TestRepository(connectionString, "MongoDbTests");
|
||||
SUT = new TestRepository("mongodb://test:Test123!@10.0.3.4:27017", "MongoDbTests");
|
||||
}
|
||||
|
||||
[OneTimeTearDown]
|
||||
|
||||
+90
-90
@@ -7,6 +7,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework.Legacy;
|
||||
|
||||
namespace IntegrationTests.Infrastructure
|
||||
{
|
||||
@@ -65,8 +66,7 @@ namespace IntegrationTests.Infrastructure
|
||||
[OneTimeSetUp]
|
||||
public void Init()
|
||||
{
|
||||
var connectionString = ConfigurationManager.ConnectionStrings["MongoDbTests"].ConnectionString;
|
||||
SUT = new TestRepository(connectionString, "MongoDbTests");
|
||||
SUT = new TestRepository("mongodb://test:Test123!@10.0.3.4:27017/", "MongoDbTests");
|
||||
}
|
||||
|
||||
[OneTimeTearDown]
|
||||
@@ -95,7 +95,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Assert
|
||||
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T>(e => e.Id.Equals(document.Id))
|
||||
: SUT.Count<T>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
Assert.AreEqual(1, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(1), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -108,7 +108,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Assert
|
||||
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T>(e => e.Id.Equals(document.Id))
|
||||
: SUT.Count<T>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
Assert.AreEqual(1, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(1), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -123,7 +123,7 @@ namespace IntegrationTests.Infrastructure
|
||||
|| e.Id.Equals(documents[1].Id))
|
||||
: SUT.Count<T>(e => e.Id.Equals(documents[0].Id)
|
||||
|| e.Id.Equals(documents[1].Id), PartitionKey);
|
||||
Assert.AreEqual(2, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(2), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -138,7 +138,7 @@ namespace IntegrationTests.Infrastructure
|
||||
|| e.Id.Equals(documents[1].Id))
|
||||
: SUT.Count<T>(e => e.Id.Equals(documents[0].Id)
|
||||
|| e.Id.Equals(documents[1].Id), PartitionKey);
|
||||
Assert.AreEqual(2, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(2), GetTestName());
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.GetByIdAsync<T>(document.Id, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -167,7 +167,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -179,7 +179,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.GetOneAsync<T>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -191,7 +191,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.GetOne<T>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -204,7 +204,7 @@ namespace IntegrationTests.Infrastructure
|
||||
var cursor = SUT.GetCursor<T>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
var count = cursor.CountDocuments();
|
||||
// Assert
|
||||
Assert.AreEqual(1, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(1), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -216,7 +216,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.AnyAsync<T>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(true, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(true), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -228,7 +228,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.AnyAsync<T>(x => x.Id.Equals(Guid.NewGuid()), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(false, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(false), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -240,7 +240,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.Any<T>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(true, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(true), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -252,7 +252,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.Any<T>(x => x.Id.Equals(Guid.NewGuid()), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(false, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(false), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -266,7 +266,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.GetAllAsync<T>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -280,7 +280,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.GetAll<T>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -294,7 +294,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.CountAsync<T>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -308,7 +308,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.Count<T>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Read
|
||||
@@ -326,10 +326,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T>(document);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
ClassicAssert.IsTrue(result);
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -343,10 +343,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T>(document);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
ClassicAssert.IsTrue(result);
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -359,10 +359,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T, string>(document, x => x.SomeContent, content);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -375,10 +375,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T, string>(document, x => x.SomeContent, content);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -391,10 +391,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -407,10 +407,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -430,13 +430,13 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T>(document, updateDef);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
ClassicAssert.IsTrue(result);
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument);
|
||||
Assert.AreEqual(childrenToAdd[0].Type, updatedDocument.Children[0].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[0].Value, updatedDocument.Children[0].Value, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Type, updatedDocument.Children[1].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Value, updatedDocument.Children[1].Value, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument);
|
||||
Assert.That(updatedDocument.Children[0].Type, Is.EqualTo(childrenToAdd[0].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[0].Value, Is.EqualTo(childrenToAdd[0].Value), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Type, Is.EqualTo(childrenToAdd[1].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Value, Is.EqualTo(childrenToAdd[1].Value), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -456,13 +456,13 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T>(document, updateDef);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
ClassicAssert.IsTrue(result);
|
||||
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument);
|
||||
Assert.AreEqual(childrenToAdd[0].Type, updatedDocument.Children[0].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[0].Value, updatedDocument.Children[0].Value, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Type, updatedDocument.Children[1].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Value, updatedDocument.Children[1].Value, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument);
|
||||
Assert.That(updatedDocument.Children[0].Type, Is.EqualTo(childrenToAdd[0].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[0].Value, Is.EqualTo(childrenToAdd[0].Value), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Type, Is.EqualTo(childrenToAdd[1].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Value, Is.EqualTo(childrenToAdd[1].Value), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Update
|
||||
@@ -478,8 +478,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteOne<T>(document);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -491,8 +491,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteOne<T>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -504,8 +504,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteOneAsync<T>(document);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -517,8 +517,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteOneAsync<T>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -532,8 +532,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteManyAsync<T>(e => e.SomeContent == criteria, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -547,8 +547,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteManyAsync<T>(documents);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -562,8 +562,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteMany<T>(e => e.SomeContent == criteria, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -577,8 +577,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteMany<T>(documents);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Delete
|
||||
@@ -605,10 +605,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
Assert.AreEqual(someContent, result.SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.SomeDate.Second, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
Assert.That(result.SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -631,10 +631,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
Assert.AreEqual(someContent, result.SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.SomeDate.Second, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
Assert.That(result.SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -661,10 +661,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.AreEqual(someContent, result.First().SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.First().SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.First().SomeDate.Second, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
Assert.That(result.First().SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -691,10 +691,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.AreEqual(someContent, result.First().SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.First().SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.First().SomeDate.Second, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
Assert.That(result.First().SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Project
|
||||
@@ -730,11 +730,11 @@ namespace IntegrationTests.Infrastructure
|
||||
|
||||
// Assert
|
||||
var key1Group = result.First(e => e.Key == 1);
|
||||
Assert.NotNull(key1Group);
|
||||
Assert.AreEqual(3, key1Group.Content.Count);
|
||||
ClassicAssert.NotNull(key1Group);
|
||||
Assert.That(key1Group.Content.Count, Is.EqualTo(3));
|
||||
var key2Group = result.First(e => e.Key == 2);
|
||||
Assert.NotNull(key2Group);
|
||||
Assert.AreEqual(2, key2Group.Content.Count);
|
||||
ClassicAssert.NotNull(key2Group);
|
||||
Assert.That(key2Group.Content.Count, Is.EqualTo(2));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -775,11 +775,11 @@ namespace IntegrationTests.Infrastructure
|
||||
|
||||
// Assert
|
||||
var key1Group = result.First(e => e.Key == 4);
|
||||
Assert.NotNull(key1Group);
|
||||
Assert.AreEqual(3, key1Group.Content.Count);
|
||||
ClassicAssert.NotNull(key1Group);
|
||||
Assert.That(key1Group.Content.Count, Is.EqualTo(3));
|
||||
var key2Group = result.First(e => e.Key == 5);
|
||||
Assert.NotNull(key2Group);
|
||||
Assert.AreEqual(1, key2Group.Content.Count);
|
||||
ClassicAssert.NotNull(key2Group);
|
||||
Assert.That(key2Group.Content.Count, Is.EqualTo(1));
|
||||
}
|
||||
|
||||
#endregion Group By
|
||||
@@ -818,4 +818,4 @@ namespace IntegrationTests.Infrastructure
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework.Legacy;
|
||||
|
||||
namespace IntegrationTests.Infrastructure
|
||||
{
|
||||
@@ -66,8 +67,7 @@ namespace IntegrationTests.Infrastructure
|
||||
[OneTimeSetUp]
|
||||
public void Init()
|
||||
{
|
||||
var connectionString = ConfigurationManager.ConnectionStrings["MongoDbTests"].ConnectionString;
|
||||
SUT = new TestRepository(connectionString, "MongoDbTests");
|
||||
SUT = new TestRepository("mongodb://test:Test123!@10.0.3.4:27017", "MongoDbTests");
|
||||
}
|
||||
|
||||
[OneTimeTearDown]
|
||||
@@ -96,7 +96,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Assert
|
||||
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T, TKey>(e => e.Id.Equals(document.Id))
|
||||
: SUT.Count<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
Assert.AreEqual(1, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(1), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -109,7 +109,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Assert
|
||||
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T, TKey>(e => e.Id.Equals(document.Id))
|
||||
: SUT.Count<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
Assert.AreEqual(1, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(1), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -124,7 +124,7 @@ namespace IntegrationTests.Infrastructure
|
||||
|| e.Id.Equals(documents[1].Id))
|
||||
: SUT.Count<T, TKey>(e => e.Id.Equals(documents[0].Id)
|
||||
|| e.Id.Equals(documents[1].Id), PartitionKey);
|
||||
Assert.AreEqual(2, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(2), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -139,7 +139,7 @@ namespace IntegrationTests.Infrastructure
|
||||
|| e.Id.Equals(documents[1].Id))
|
||||
: SUT.Count<T, TKey>(e => e.Id.Equals(documents[0].Id)
|
||||
|| e.Id.Equals(documents[1].Id), PartitionKey);
|
||||
Assert.AreEqual(2, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(2), GetTestName());
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.GetByIdAsync<T, TKey>(document.Id, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -168,7 +168,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -180,7 +180,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.GetOneAsync<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -192,7 +192,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.GetOne<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -205,7 +205,7 @@ namespace IntegrationTests.Infrastructure
|
||||
var cursor = SUT.GetCursor<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
var count = cursor.CountDocuments();
|
||||
// Assert
|
||||
Assert.AreEqual(1, count, GetTestName());
|
||||
Assert.That(count, Is.EqualTo(1), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -217,7 +217,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.AnyAsync<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(true, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(true), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -229,7 +229,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.AnyAsync<T, TKey>(x => x.Id.Equals(document.Init<TKey>()), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(false, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(false), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -241,7 +241,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.Any<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(true, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(true), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -253,7 +253,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.Any<T, TKey>(x => x.Id.Equals(document.Init<TKey>()), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(false, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(false), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -267,7 +267,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.GetAllAsync<T, TKey>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -281,7 +281,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.GetAll<T, TKey>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -295,7 +295,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.CountAsync<T, TKey>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -309,7 +309,7 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.Count<T, TKey>(x => x.SomeContent == content, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result, GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Read
|
||||
@@ -327,10 +327,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T, TKey>(document);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
Assert.That(result, Is.True);
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -344,10 +344,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T, TKey>(document);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
Assert.That(result, Is.True);
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -360,10 +360,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T, TKey, string>(document, x => x.SomeContent, content);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -376,10 +376,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T, TKey, string>(document, x => x.SomeContent, content);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -392,10 +392,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T, TKey, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -408,10 +408,10 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T, TKey, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
|
||||
// Assert
|
||||
Assert.IsTrue(result, GetTestName());
|
||||
ClassicAssert.IsTrue(result, GetTestName());
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.AreEqual(content, updatedDocument.SomeContent, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument, GetTestName());
|
||||
Assert.That(updatedDocument.SomeContent, Is.EqualTo(content), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -431,13 +431,13 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.UpdateOneAsync<T, TKey>(document, updateDef);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
ClassicAssert.IsTrue(result);
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument);
|
||||
Assert.AreEqual(childrenToAdd[0].Type, updatedDocument.Children[0].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[0].Value, updatedDocument.Children[0].Value, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Type, updatedDocument.Children[1].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Value, updatedDocument.Children[1].Value, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument);
|
||||
Assert.That(updatedDocument.Children[0].Type, Is.EqualTo(childrenToAdd[0].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[0].Value, Is.EqualTo(childrenToAdd[0].Value), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Type, Is.EqualTo(childrenToAdd[1].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Value, Is.EqualTo(childrenToAdd[1].Value), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -457,13 +457,13 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.UpdateOne<T, TKey>(document, updateDef);
|
||||
// Assert
|
||||
Assert.IsTrue(result);
|
||||
ClassicAssert.IsTrue(result);
|
||||
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
|
||||
Assert.IsNotNull(updatedDocument);
|
||||
Assert.AreEqual(childrenToAdd[0].Type, updatedDocument.Children[0].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[0].Value, updatedDocument.Children[0].Value, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Type, updatedDocument.Children[1].Type, GetTestName());
|
||||
Assert.AreEqual(childrenToAdd[1].Value, updatedDocument.Children[1].Value, GetTestName());
|
||||
ClassicAssert.IsNotNull(updatedDocument);
|
||||
Assert.That(updatedDocument.Children[0].Type, Is.EqualTo(childrenToAdd[0].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[0].Value, Is.EqualTo(childrenToAdd[0].Value), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Type, Is.EqualTo(childrenToAdd[1].Type), GetTestName());
|
||||
Assert.That(updatedDocument.Children[1].Value, Is.EqualTo(childrenToAdd[1].Value), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Update
|
||||
@@ -479,8 +479,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteOne<T, TKey>(document);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -492,8 +492,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteOne<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -505,8 +505,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteOneAsync<T, TKey>(document);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -518,8 +518,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteOneAsync<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(1, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(1));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -533,8 +533,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteManyAsync<T, TKey>(e => e.SomeContent == criteria, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -548,8 +548,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = await SUT.DeleteManyAsync<T, TKey>(documents);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -563,8 +563,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteMany<T, TKey>(e => e.SomeContent == criteria, PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -578,8 +578,8 @@ namespace IntegrationTests.Infrastructure
|
||||
// Act
|
||||
var result = SUT.DeleteMany<T, TKey>(documents);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result);
|
||||
Assert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
Assert.That(result, Is.EqualTo(5));
|
||||
ClassicAssert.IsFalse(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Delete
|
||||
@@ -606,10 +606,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
Assert.AreEqual(someContent, result.SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.SomeDate.Second, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
Assert.That(result.SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -632,10 +632,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.IsNotNull(result, GetTestName());
|
||||
Assert.AreEqual(someContent, result.SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.SomeDate.Second, GetTestName());
|
||||
ClassicAssert.IsNotNull(result, GetTestName());
|
||||
Assert.That(result.SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -662,10 +662,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.AreEqual(someContent, result.First().SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.First().SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.First().SomeDate.Second, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
Assert.That(result.First().SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -692,10 +692,10 @@ namespace IntegrationTests.Infrastructure
|
||||
},
|
||||
PartitionKey);
|
||||
// Assert
|
||||
Assert.AreEqual(5, result.Count, GetTestName());
|
||||
Assert.AreEqual(someContent, result.First().SomeContent, GetTestName());
|
||||
Assert.AreEqual(someDate.Minute, result.First().SomeDate.Minute, GetTestName());
|
||||
Assert.AreEqual(someDate.Second, result.First().SomeDate.Second, GetTestName());
|
||||
Assert.That(result.Count, Is.EqualTo(5), GetTestName());
|
||||
Assert.That(result.First().SomeContent, Is.EqualTo(someContent), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Minute, Is.EqualTo(someDate.Minute), GetTestName());
|
||||
Assert.That(result.First().SomeDate.Second, Is.EqualTo(someDate.Second), GetTestName());
|
||||
}
|
||||
|
||||
#endregion Project
|
||||
|
||||
@@ -1,199 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit3TestAdapter.4.0.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.4.0.0\build\net35\NUnit3TestAdapter.props')" />
|
||||
<Import Project="..\packages\NUnit.3.13.2\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.2\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A484A355-A015-40CC-9B35-A4E872421128}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>IntegrationTests</RootNamespace>
|
||||
<AssemblyName>IntegrationTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AWSSDK.Core.3.7.100.14\lib\net45\AWSSDK.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AWSSDK.SecurityToken, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AWSSDK.SecurityToken.3.7.100.14\lib\net45\AWSSDK.SecurityToken.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Crc32C.NET, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Crc32C.NET.1.0.5.0\lib\net20\Crc32C.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DnsClient, Version=1.6.1.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DnsClient.1.6.1\lib\net471\DnsClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Bson, Version=2.20.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Bson.2.20.0\lib\net472\MongoDB.Bson.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver, Version=2.18.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.2.18.0\lib\net472\MongoDB.Driver.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver.Core, Version=2.20.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.Core.2.20.0\lib\net472\MongoDB.Driver.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Libmongocrypt, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Libmongocrypt.1.9.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="nunit.framework, Version=3.13.2.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.13.2\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpCompress, Version=0.30.1.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpCompress.0.30.1\lib\net461\SharpCompress.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Snappier, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a1b25124e6e13a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Snappier.1.0.0\lib\netstandard2.0\Snappier.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Snappy.NET, Version=1.1.1.8, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.AccessControl.5.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.5.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ZstdSharp, Version=0.7.3.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ZstdSharp.Port.0.7.3\lib\net461\ZstdSharp.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CRUDObjectIdTests.cs" />
|
||||
<Compile Include="CRUDPartitionedTests.cs" />
|
||||
<Compile Include="CRUDTKeyPartitionedCollectionNameAttributeTests.cs" />
|
||||
<Compile Include="CRUDTests.cs" />
|
||||
<Compile Include="CRUDPartitionedCollectionNameAttributeTests.cs" />
|
||||
<Compile Include="CRUDTKeyPartitionedTests.cs" />
|
||||
<Compile Include="CRUDTKeyTests.cs" />
|
||||
<Compile Include="Infrastructure\BaseMongoDbRepositoryTests.cs" />
|
||||
<Compile Include="Infrastructure\GlobalVariables.cs" />
|
||||
<Compile Include="Infrastructure\ITestRepository.cs" />
|
||||
<Compile Include="Infrastructure\MongoDbDocumentTestBase.cs" />
|
||||
<Compile Include="Infrastructure\MongoDbTKeyDocumentTestBase.cs" />
|
||||
<Compile Include="Infrastructure\RandomExtensions.cs" />
|
||||
<Compile Include="Infrastructure\TestClasses.cs" />
|
||||
<Compile Include="Infrastructure\TestRepository.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MongoDbGenericRepository\MongoDbGenericRepository.csproj">
|
||||
<Project>{efc776c4-2af3-440c-be80-3fbe335817a5}</Project>
|
||||
<Name>MongoDbGenericRepository</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\packages\AWSSDK.SecurityToken.3.7.100.14\analyzers\dotnet\cs\AWSSDK.SecurityToken.CodeAnalysis.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="libmongocrypt.dylib" />
|
||||
<Content Include="libmongocrypt.so" />
|
||||
<Content Include="mongocrypt.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.13.2\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.2\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.4.0.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.4.0.0\build\net35\NUnit3TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MongoDB.Libmongocrypt.1.9.0\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.9.0\build\MongoDB.Libmongocrypt.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MongoDB.Libmongocrypt.1.9.0\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.9.0\build\MongoDB.Libmongocrypt.targets')" />
|
||||
</Project>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.Core" Version="3.7.400.57" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Crc32.NET" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||
<PackageReference Include="NUnit" Version="4.2.2" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.4.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
|
||||
|
||||
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.401.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="NUnit.Framework"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="App.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CoreIntegrationTests\CoreIntegrationTests.csproj" />
|
||||
<ProjectReference Include="..\MongoDbGenericRepository\MongoDbGenericRepository.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("IntegrationTests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("IntegrationTests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("a484a355-a015-40cc-9b35-a4e872421128")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MongoDB.Driver.Core" version="2.25.0" targetFramework="net48" />
|
||||
<package id="MongoDB.Libmongocrypt" version="1.9.0" targetFramework="net48" />
|
||||
<package id="AWSSDK.Core" version="3.7.100.14" targetFramework="net48" />
|
||||
<package id="AWSSDK.SecurityToken" version="3.7.100.14" targetFramework="net48" />
|
||||
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net461" />
|
||||
<package id="DnsClient" version="1.6.1" targetFramework="net48" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.0.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Win32.Registry" version="5.0.0" targetFramework="net48" />
|
||||
<package id="MongoDB.Bson" version="2.25.0" targetFramework="net48" />
|
||||
<package id="MongoDB.Driver" version="2.25.0" targetFramework="net48" />
|
||||
<package id="NUnit" version="3.13.2" targetFramework="net461" />
|
||||
<package id="NUnit.ConsoleRunner" version="3.12.0" targetFramework="net461" />
|
||||
<package id="NUnit3TestAdapter" version="4.0.0" targetFramework="net461" />
|
||||
<package id="SharpCompress" version="0.30.1" targetFramework="net48" />
|
||||
<package id="Snappier" version="1.0.0" targetFramework="net48" />
|
||||
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net461" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
|
||||
<package id="System.IO" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
||||
<package id="System.Net.Http" version="4.3.4" targetFramework="net461" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" />
|
||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.AccessControl" version="5.0.0" targetFramework="net48" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net48" />
|
||||
<package id="System.Text.Encoding.CodePages" version="5.0.0" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||
<package id="ZstdSharp.Port" version="0.7.3" targetFramework="net48" />
|
||||
</packages>
|
||||
@@ -3,24 +3,20 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26730.12
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests", "IntegrationTests\IntegrationTests.csproj", "{A484A355-A015-40CC-9B35-A4E872421128}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongoDbGenericRepository", "MongoDbGenericRepository\MongoDbGenericRepository.csproj", "{EFC776C4-2AF3-440C-BE80-3FBE335817A5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreIntegrationTests", "CoreIntegrationTests\CoreIntegrationTests.csproj", "{C640C106-7A25-4E49-A0CF-E4F248E5A97F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoreUnitTests", "CoreUnitTests\CoreUnitTests.csproj", "{8BE513ED-84F4-47E1-946D-84958CF95E6B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTests", "IntegrationTests\IntegrationTests.csproj", "{B3146094-8062-45C4-8FF9-4E1CBDDCAB59}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A484A355-A015-40CC-9B35-A4E872421128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A484A355-A015-40CC-9B35-A4E872421128}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A484A355-A015-40CC-9B35-A4E872421128}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A484A355-A015-40CC-9B35-A4E872421128}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFC776C4-2AF3-440C-BE80-3FBE335817A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFC776C4-2AF3-440C-BE80-3FBE335817A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFC776C4-2AF3-440C-BE80-3FBE335817A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -33,6 +29,10 @@ Global
|
||||
{8BE513ED-84F4-47E1-946D-84958CF95E6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8BE513ED-84F4-47E1-946D-84958CF95E6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8BE513ED-84F4-47E1-946D-84958CF95E6B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B3146094-8062-45C4-8FF9-4E1CBDDCAB59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B3146094-8062-45C4-8FF9-4E1CBDDCAB59}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B3146094-8062-45C4-8FF9-4E1CBDDCAB59}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B3146094-8062-45C4-8FF9-4E1CBDDCAB59}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using MongoDB.Driver.Linq;
|
||||
using MongoDbGenericRepository.Models;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace MongoDbGenericRepository.DataAccess.Base
|
||||
@@ -35,7 +36,7 @@ namespace MongoDbGenericRepository.DataAccess.Base
|
||||
/// <param name="filter">The filter definition.</param>
|
||||
/// <param name="partitionKey">The collection partition key.</param>
|
||||
/// <returns></returns>
|
||||
public virtual IMongoQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
public virtual IQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.Linq;
|
||||
@@ -19,7 +20,7 @@ namespace MongoDbGenericRepository.DataAccess.Base
|
||||
/// <param name="filter">The filter definition.</param>
|
||||
/// <param name="partitionKey">The collection partition key.</param>
|
||||
/// <returns></returns>
|
||||
IMongoQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
IQueryable<TDocument> GetQuery<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, string partitionKey = null)
|
||||
where TDocument : IDocument<TKey>
|
||||
where TKey : IEquatable<TKey>;
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ namespace MongoDbGenericRepository
|
||||
// GuidRepresentation and GuidRepresentationMode will be removed in the next major release of the MongoDB Driver.
|
||||
// We can safely replace this with RepositorySerializationProvider.Instance.RegisterSerializer once we upgrade to the next major release.
|
||||
#pragma warning disable CS0618
|
||||
BsonDefaults.GuidRepresentationMode = GuidRepresentationMode.V3;
|
||||
RepositorySerializationProvider.Instance.RegisterSerializer(new GuidSerializer(guidRepresentation));
|
||||
#pragma warning restore CS0618
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net472;netstandard2.0;</TargetFrameworks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageId>MongoDbGenericRepository</PackageId>
|
||||
<PackageVersion>1.6.0</PackageVersion>
|
||||
<Authors>Alexandre Spieser</Authors>
|
||||
<PackageTitle>MongoDb Generic Repository</PackageTitle>
|
||||
<Description>A generic repository implementation using the MongoDB C# Sharp 2.0 driver.</Description>
|
||||
@@ -15,9 +13,10 @@
|
||||
<Copyright>Copyright 2023 (c) Alexandre Spieser. All rights reserved.</Copyright>
|
||||
<PackageTags>MongoDb Repository Generic NoSql</PackageTags>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Version>1.6.0</Version>
|
||||
<RepositoryUrl>https://github.com/alexandre-spieser/mongodb-generic-repository</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -25,7 +24,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.25.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user