added objectid tests
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
using CoreIntegrationTests.Infrastructure;
|
||||
using MongoDB.Bson;
|
||||
using MongoDbGenericRepository.Attributes;
|
||||
using MongoDbGenericRepository.Models;
|
||||
using System;
|
||||
|
||||
namespace CoreIntegrationTests
|
||||
{
|
||||
#region Guid Type
|
||||
|
||||
[CollectionName("TestingCNameAttrPartTKey")]
|
||||
public class CoreTKeyPartitionedCollectionNameDoc : TestDoc<Guid>, IPartitionedDocument
|
||||
{
|
||||
@@ -28,4 +31,35 @@ namespace CoreIntegrationTests
|
||||
return "CoreCRUDTKeyPartitionedCollectionNameAttributeTests";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Guid Type
|
||||
|
||||
|
||||
#region ObjectId Type
|
||||
|
||||
[CollectionName("TestingCNameAttrPartObjectId")]
|
||||
public class CoreObjectIdPartitionedCollectionNameDoc : TestDoc<ObjectId>, IPartitionedDocument
|
||||
{
|
||||
public CoreObjectIdPartitionedCollectionNameDoc()
|
||||
{
|
||||
PartitionKey = "CoreTestPartitionKeyObjectId";
|
||||
}
|
||||
|
||||
public string PartitionKey { get; set; }
|
||||
}
|
||||
|
||||
public class CRUDObjectIdPartitionedCollectionNameAttributeTests : MongoDbTKeyDocumentTestBase<CoreObjectIdPartitionedCollectionNameDoc, ObjectId>
|
||||
{
|
||||
public CRUDObjectIdPartitionedCollectionNameAttributeTests(MongoDbTestFixture<CoreObjectIdPartitionedCollectionNameDoc, ObjectId> fixture) : base(fixture)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string GetClassName()
|
||||
{
|
||||
return "CoreCRUDTKeyPartitionedCollectionNameAttributeTests";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion ObjectId Type
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace CoreIntegrationTests
|
||||
{
|
||||
public CRUDTests(MongoDbTestFixture<CoreTestDocument, Guid> fixture) : base(fixture)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override string GetClassName()
|
||||
|
||||
@@ -5,10 +5,8 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace CoreIntegrationTests.Infrastructure
|
||||
{
|
||||
|
||||
public class MongoDbTestFixture<T, TKey> : IDisposable
|
||||
where T : IDocument<TKey>, new()
|
||||
where TKey : IEquatable<TKey>
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace MongoDbGenericRepository
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously returns a paginated list of the documents matching the filter condition.
|
||||
/// </summary>
|
||||
@@ -71,7 +70,6 @@ namespace MongoDbGenericRepository
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously returns a paginated list of the documents matching the filter condition.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user