Updated to .Net Core 8
This commit is contained in:
@@ -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,59 @@
|
||||
<?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.28.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Bson.2.28.0\lib\net472\MongoDB.Bson.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver, Version=2.28.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.2.28.0\lib\net472\MongoDB.Driver.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Driver.Core, Version=2.28.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Driver.Core.2.28.0\lib\net472\MongoDB.Driver.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MongoDB.Libmongocrypt, Version=1.11.0.0, Culture=neutral, PublicKeyToken=94992a530f44e321, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MongoDB.Libmongocrypt.1.11.0\lib\net472\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="libmongocrypt.dylib" />
|
||||
<None Include="libmongocrypt.so" />
|
||||
<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="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.11.0\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.11.0\build\MongoDB.Libmongocrypt.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MongoDB.Libmongocrypt.1.11.0\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.11.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="DnsClient" Version="1.8.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="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="3.0.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="3.0.0" />
|
||||
<PackageReference Include="MongoDB.Libmongocrypt" Version="1.12.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" />
|
||||
|
||||
|
||||
<PackageReference Include="SharpCompress" Version="0.38.0" />
|
||||
|
||||
|
||||
<PackageReference Include="Snappier" Version="1.1.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="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.28.0" targetFramework="net48" />
|
||||
<package id="MongoDB.Driver" version="2.28.0" targetFramework="net48" />
|
||||
<package id="MongoDB.Driver.Core" version="2.28.0" targetFramework="net48" />
|
||||
<package id="MongoDB.Libmongocrypt" version="1.11.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>
|
||||
Reference in New Issue
Block a user