Showing preview only (2,764K chars total). Download the full file or copy to clipboard to get everything.
Repository: alexandre-spieser/mongodb-generic-repository
Branch: master
Commit: 0c20dfca3894
Files: 254
Total size: 2.6 MB
Directory structure:
gitextract_61u1jiz3/
├── .gitignore
├── CoreIntegrationTests/
│ ├── App.config
│ ├── CRUDObjectIdTests.cs
│ ├── CRUDPartitionedCollectionNameAttributeTests.cs
│ ├── CRUDPartitionedTests.cs
│ ├── CRUDTKeyPartitionedCollectionNameAttributeTests.cs
│ ├── CRUDTKeyPartitionedTests.cs
│ ├── CRUDTKeyTests.cs
│ ├── CRUDTests.cs
│ ├── CoreIntegrationTests.csproj
│ ├── IdentityUserTests.cs
│ └── Infrastructure/
│ ├── BaseMongoDbRepositoryTests.cs
│ ├── GlobalVariables.cs
│ ├── ITestRepository.cs
│ ├── MongoDbConfig.cs
│ ├── MongoDbDocumentTestBase.Main.cs
│ ├── MongoDbDocumentTestBase.Update.cs
│ ├── MongoDbTKeyDocumentTestBase.Main.cs
│ ├── MongoDbTKeyDocumentTestBase.Update.cs
│ ├── MongoDbTestFixture.cs
│ ├── RandomExtensions.cs
│ ├── TestClasses.cs
│ └── TestRepository.cs
├── CoreUnitTests/
│ ├── .editorconfig
│ ├── BaseMongoRepositoryTests/
│ │ ├── AddTests/
│ │ │ ├── AddManyAsyncTests.cs
│ │ │ ├── AddManyTests.cs
│ │ │ ├── AddOneAsyncTests.cs
│ │ │ └── AddOneTests.cs
│ │ ├── DeleteTests/
│ │ │ ├── DeleteManyAsyncTests.cs
│ │ │ ├── DeleteManyTests.cs
│ │ │ ├── DeleteOneAsyncTests.cs
│ │ │ └── DeleteOneTests.cs
│ │ ├── IndexTests/
│ │ │ ├── BaseIndexTests.cs
│ │ │ ├── CreateAscendingIndexAsyncTests.cs
│ │ │ ├── CreateCombinedTextIndexAsyncTests.cs
│ │ │ ├── CreateDescendingIndexAsyncTests.cs
│ │ │ ├── CreateHashedIndexAsyncTests.cs
│ │ │ ├── CreateTextIndexAsyncTests.cs
│ │ │ ├── DropIndexAsyncTests.cs
│ │ │ └── GetIndexNamesAsyncTests.cs
│ │ └── UpdateTests/
│ │ ├── UpdateManyAsyncTests.cs
│ │ ├── UpdateManyTests.cs
│ │ ├── UpdateOneAsyncTests.cs
│ │ └── UpdateOneTests.cs
│ ├── CoreUnitTests.csproj
│ ├── DataAccessTests/
│ │ ├── MongoDbCreatorTests/
│ │ │ ├── AddManyAsyncTests.cs
│ │ │ ├── AddManyTests.cs
│ │ │ ├── AddOneAsyncTests.cs
│ │ │ └── AddOneTests.cs
│ │ ├── MongoDbEraserTests/
│ │ │ ├── DeleteManyAsyncTests.cs
│ │ │ ├── DeleteManyTests.cs
│ │ │ ├── DeleteOneAsyncTests.cs
│ │ │ └── DeleteOneTests.cs
│ │ ├── MongoDbIndexHandlerTests/
│ │ │ ├── BaseIndexTests.cs
│ │ │ ├── CreateAscendingIndexAsyncTests.cs
│ │ │ ├── CreateCombinedTextIndexAsyncTests.cs
│ │ │ ├── CreateDescendingIndexAsyncTests.cs
│ │ │ ├── CreateHashedIndexAsyncTests.cs
│ │ │ ├── CreateTextIndexAsyncTests.cs
│ │ │ ├── DropIndexAsyncTests.cs
│ │ │ └── GetIndexNamesAsyncTests.cs
│ │ ├── MongoDbReaderTests/
│ │ │ ├── AnyAsyncTests.cs
│ │ │ ├── AnyTests.cs
│ │ │ ├── BaseReaderTests.cs
│ │ │ ├── CountAsyncTests.cs
│ │ │ ├── CountTests.cs
│ │ │ ├── GetAllAsyncTests.cs
│ │ │ ├── GetAllTests.cs
│ │ │ ├── GetByIdAsyncTests.cs
│ │ │ ├── GetByIdTests.cs
│ │ │ ├── GetByMaxAsyncTests.cs
│ │ │ ├── GetByMaxTests.cs
│ │ │ ├── GetByMinAsyncTests.cs
│ │ │ ├── GetByMinTests.cs
│ │ │ ├── GetMaxValueAsyncTests .cs
│ │ │ ├── GetMaxValueTests .cs
│ │ │ ├── GetMinValueAsyncTests .cs
│ │ │ ├── GetMinValueTests .cs
│ │ │ ├── GetOneAsyncTests.cs
│ │ │ ├── GetOneTests.cs
│ │ │ ├── ProjectManyAsyncTests.cs
│ │ │ ├── ProjectManyTests.cs
│ │ │ ├── ProjectOneAsyncTests.cs
│ │ │ └── ProjectOneTests.cs
│ │ └── MongoDbUpdaterTests/
│ │ ├── UpdateManyAsyncTests.cs
│ │ ├── UpdateManyTests.cs
│ │ ├── UpdateOneAsyncTests.cs
│ │ └── UpdateOneTests.cs
│ ├── Infrastructure/
│ │ ├── FilterDefinitionExtensions.cs
│ │ ├── GenericTestContext.cs
│ │ ├── IndexExtensions.cs
│ │ ├── Model/
│ │ │ ├── Child.cs
│ │ │ ├── Nested.cs
│ │ │ ├── PartitionedTestDocument.cs
│ │ │ ├── TestDocument.cs
│ │ │ ├── TestDocumentWithKey.cs
│ │ │ └── TestProjection.cs
│ │ ├── TestKeyedMongoRepository.cs
│ │ ├── TestKeyedMongoRepositoryContext.cs
│ │ ├── TestKeyedReadOnlyMongoRepository.cs
│ │ ├── TestKeyedReadOnlyMongoRepositoryContext.cs
│ │ ├── TestMongoRepository.cs
│ │ ├── TestMongoRepositoryContext.cs
│ │ ├── TestReadOnlyMongoRepository.cs
│ │ ├── TestReadOnlyMongoRepositoryContext.cs
│ │ └── UpdateDefinitionExtensions.cs
│ ├── KeyTypedRepositoryTests/
│ │ ├── AddTests/
│ │ │ ├── AddManyAsyncTests.cs
│ │ │ ├── AddManyTests.cs
│ │ │ ├── AddOneAsyncTests.cs
│ │ │ └── AddOneTests.cs
│ │ ├── DeleteTests/
│ │ │ ├── DeleteManyAsyncTests.cs
│ │ │ ├── DeleteManyTests.cs
│ │ │ ├── DeleteOneAsyncTests.cs
│ │ │ └── DeleteOneTests.cs
│ │ ├── IndexTests/
│ │ │ ├── CreateAscendingIndexAsyncTests.cs
│ │ │ ├── CreateCombinedTextIndexAsyncTests.cs
│ │ │ ├── CreateDescendingIndexAsyncTests.cs
│ │ │ ├── CreateHashedIndexAsyncTests.cs
│ │ │ ├── CreateTextIndexAsyncTests.cs
│ │ │ ├── DropIndexAsyncTests.cs
│ │ │ └── GetIndexNamesAsyncTests.cs
│ │ └── UpdateTests/
│ │ ├── UpdateManyAsyncTests.cs
│ │ ├── UpdateManyTests.cs
│ │ ├── UpdateOneAsyncTests.cs
│ │ └── UpdateOneTests.cs
│ ├── KeyedReadOnlyMongoRepositoryTests/
│ │ ├── AnyAsyncTests.cs
│ │ ├── AnyTests.cs
│ │ ├── CountAsyncTests.cs
│ │ ├── CountTests.cs
│ │ ├── GetAllAsyncTests.cs
│ │ ├── GetAllTests.cs
│ │ ├── GetByIdAsyncTests.cs
│ │ ├── GetByIdTests.cs
│ │ ├── GetByMaxAsyncTests.cs
│ │ ├── GetByMaxTests.cs
│ │ ├── GetByMinAsyncTests.cs
│ │ ├── GetByMinTests.cs
│ │ ├── GetMaxValueAsyncTests.cs
│ │ ├── GetMaxValueTests.cs
│ │ ├── GetMinValueAsyncTests.cs
│ │ ├── GetMinValueTests.cs
│ │ ├── GetOneAsyncTests.cs
│ │ ├── GetOneTests.cs
│ │ ├── GetSortedPaginatedAsyncTests.cs
│ │ ├── GroupByTests.cs
│ │ ├── ProjectManyAsyncTests.cs
│ │ ├── ProjectManyTests.cs
│ │ ├── ProjectOneAsyncTests.cs
│ │ ├── ProjectOneTests.cs
│ │ └── SumByAsyncTests.cs
│ └── ReadOnlyMongoRepositoryTests/
│ ├── AnyAsyncTests.cs
│ ├── AnyTests.cs
│ ├── CountAsyncTests.cs
│ ├── CountTests.cs
│ ├── GetAllAsyncTests.cs
│ ├── GetAllTests.cs
│ ├── GetByIdAsyncTests.cs
│ ├── GetByIdTests.cs
│ ├── GetByMaxAsyncTests.cs
│ ├── GetByMaxTests.cs
│ ├── GetByMinAsyncTests.cs
│ ├── GetByMinTests.cs
│ ├── GetMaxValueAsyncTests.cs
│ ├── GetMaxValueTests.cs
│ ├── GetMinValueAsyncTests.cs
│ ├── GetMinValueTests.cs
│ ├── GetOneAsyncTests.cs
│ ├── GetOneTests.cs
│ ├── GetSortedPaginatedAsyncTests.cs
│ ├── GroupByTests.cs
│ ├── ProjectManyAsyncTests.cs
│ ├── ProjectManyTests.cs
│ ├── ProjectOneAsyncTests.cs
│ ├── ProjectOneTests.cs
│ └── SumByAsyncTests.cs
├── IntegrationTests/
│ ├── App.config
│ ├── CRUDObjectIdTests.cs
│ ├── CRUDPartitionedCollectionNameAttributeTests.cs
│ ├── CRUDPartitionedTests.cs
│ ├── CRUDTKeyPartitionedCollectionNameAttributeTests.cs
│ ├── CRUDTKeyPartitionedTests.cs
│ ├── CRUDTKeyTests.cs
│ ├── CRUDTests.cs
│ ├── Infrastructure/
│ │ ├── BaseMongoDbRepositoryTests.cs
│ │ ├── GlobalVariables.cs
│ │ ├── ITestRepository.cs
│ │ ├── MongoDBDocumentTestBase.cs
│ │ ├── MongoDbTKeyDocumentTestBase.cs
│ │ ├── RandomExtensions.cs
│ │ ├── TestClasses.cs
│ │ └── TestRepository.cs
│ ├── IntegrationTests.csproj
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ └── packages.config
├── LICENSE
├── MongoDbGenericRepository/
│ ├── Abstractions/
│ │ ├── IBaseMongoRepository.cs
│ │ ├── IBaseMongoRepository_Update.cs
│ │ ├── IBaseMongoRepository_Update_ClientSession.cs
│ │ ├── IBaseReadOnlyRepository.cs
│ │ ├── IMongoDbContext.cs
│ │ ├── IReadOnlyMongoRepository.TKey.cs
│ │ └── IReadOnlyMongoRepository.cs
│ ├── Attributes/
│ │ └── CollectionNameAttribute.cs
│ ├── BaseMongoRepository.Create.cs
│ ├── BaseMongoRepository.Delete.cs
│ ├── BaseMongoRepository.Index.cs
│ ├── BaseMongoRepository.Main.cs
│ ├── BaseMongoRepository.Update.ClientSession.cs
│ ├── BaseMongoRepository.Update.cs
│ ├── DataAccess/
│ │ ├── Base/
│ │ │ ├── DataAccessBase.cs
│ │ │ └── IDataAccessBase.cs
│ │ ├── Create/
│ │ │ ├── IMongoDbCreator.cs
│ │ │ └── MongoDbCreator.cs
│ │ ├── Delete/
│ │ │ ├── IMongoDbEraser.cs
│ │ │ └── MongoDbEraser.cs
│ │ ├── Index/
│ │ │ ├── IMongoDbIndexHandler.cs
│ │ │ └── MongoDbIndexHandler.cs
│ │ ├── Read/
│ │ │ ├── IMongoDbReader.cs
│ │ │ ├── MongoDbReader.GroupBy.cs
│ │ │ ├── MongoDbReader.Main.cs
│ │ │ └── MongoDbReader.Project.cs
│ │ └── Update/
│ │ ├── IMongoDbUpdater.cs
│ │ ├── MongoDbUpdater.ClientSession.cs
│ │ └── MongoDbUpdater.cs
│ ├── IBaseMongoRepository.Create.cs
│ ├── IBaseMongoRepository.Delete.cs
│ ├── IBaseMongoRepository.Index.cs
│ ├── Internals/
│ │ └── RepositorySerializationProvider.cs
│ ├── KeyTypedRepository/
│ │ ├── BaseMongoRepository.TKey.Create.cs
│ │ ├── BaseMongoRepository.TKey.Delete.cs
│ │ ├── BaseMongoRepository.TKey.Index.cs
│ │ ├── BaseMongoRepository.TKey.Main.cs
│ │ ├── BaseMongoRepository.TKey.ReadOnly.cs
│ │ ├── BaseMongoRepository.TKey.Update.cs
│ │ ├── IBaseMongoRepository.TKey.Create.cs
│ │ ├── IBaseMongoRepository.TKey.Delete.cs
│ │ ├── IBaseMongoRepository.TKey.Index.cs
│ │ ├── IBaseMongoRepository.TKey.Update.cs
│ │ └── IBaseMongoRepository.TKey.cs
│ ├── Models/
│ │ ├── Document.cs
│ │ ├── IDocument.cs
│ │ ├── IPartitionedDocument.cs
│ │ ├── IndexCreationOptions.cs
│ │ └── PartitionedDocument.cs
│ ├── MongoDbContext.cs
│ ├── MongoDbGenericRepository.csproj
│ ├── MongoDbGenericRepository.xml
│ ├── ReadOnlyMongoRepository.cs
│ ├── Utils/
│ │ ├── IdGenerator.cs
│ │ ├── Pluralization.cs
│ │ └── RandomExtensions.cs
│ └── _rels/
│ └── .rels
├── MongoDbGenericRepository.sln
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
================================================
FILE: CoreIntegrationTests/App.config
================================================
<?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>
================================================
FILE: CoreIntegrationTests/CRUDObjectIdTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using MongoDB.Bson;
namespace CoreIntegrationTests
{
public class CoreObjectIdTestDocument : TestDoc<ObjectId>
{
}
public class CRUDObjectIdTests : MongoDbTKeyDocumentTestBase<CoreObjectIdTestDocument, ObjectId>
{
public CRUDObjectIdTests(MongoDbTestFixture<CoreObjectIdTestDocument, ObjectId> fixture) : base(fixture)
{
}
public override string GetClassName()
{
return "CRUDObjectIdTests";
}
}
}
================================================
FILE: CoreIntegrationTests/CRUDPartitionedCollectionNameAttributeTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using MongoDbGenericRepository.Attributes;
using MongoDbGenericRepository.Models;
using System;
namespace CoreIntegrationTests
{
[CollectionName("CoreTestingCNameAttrPart")]
public class CorePartitionedCollectionNameDoc : TestDoc, IPartitionedDocument
{
public CorePartitionedCollectionNameDoc()
{
PartitionKey = "CoreTestPartitionKeyCollectionName";
}
public string PartitionKey { get; set; }
}
public class CRUDPartitionedCollectionNameAttributeTests : MongoDbDocumentTestBase<CorePartitionedCollectionNameDoc>
{
public CRUDPartitionedCollectionNameAttributeTests(MongoDbTestFixture<CorePartitionedCollectionNameDoc, Guid> fixture) : base(fixture)
{
}
public override string GetClassName()
{
return "CoreCRUDPartitionedCollectionNameAttributeTests";
}
}
}
================================================
FILE: CoreIntegrationTests/CRUDPartitionedTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using MongoDbGenericRepository.Models;
using System;
namespace CoreIntegrationTests
{
public class CorePartitionedDoc : TestDoc, IPartitionedDocument
{
public CorePartitionedDoc()
{
PartitionKey = "CoreTestPartitionKey";
}
public string PartitionKey { get; set; }
}
public class CRUDPartitionedTests : MongoDbDocumentTestBase<CorePartitionedDoc>
{
public CRUDPartitionedTests(MongoDbTestFixture<CorePartitionedDoc, Guid> fixture) : base(fixture)
{
}
public override string GetClassName()
{
return "CoreCRUDPartitionedTests";
}
}
}
================================================
FILE: CoreIntegrationTests/CRUDTKeyPartitionedCollectionNameAttributeTests.cs
================================================
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
{
public CoreTKeyPartitionedCollectionNameDoc()
{
PartitionKey = "CoreTestPartitionKey";
}
public string PartitionKey { get; set; }
}
public class CRUDTKeyPartitionedCollectionNameAttributeTests : MongoDbTKeyDocumentTestBase<CoreTKeyPartitionedCollectionNameDoc, Guid>
{
public CRUDTKeyPartitionedCollectionNameAttributeTests(MongoDbTestFixture<CoreTKeyPartitionedCollectionNameDoc, Guid> fixture) : base(fixture)
{
}
public override string GetClassName()
{
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
}
================================================
FILE: CoreIntegrationTests/CRUDTKeyPartitionedTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using MongoDbGenericRepository.Models;
using System;
namespace CoreIntegrationTests
{
public class CorePartitionedTKeyTestDocument : TestDoc<Guid>, IPartitionedDocument
{
public CorePartitionedTKeyTestDocument()
{
PartitionKey = "CoreTestPartitionKey";
}
public string PartitionKey { get; set; }
}
public class CRUDTKeyPartitionedTests : MongoDbTKeyDocumentTestBase<CorePartitionedTKeyTestDocument, Guid>
{
public CRUDTKeyPartitionedTests(MongoDbTestFixture<CorePartitionedTKeyTestDocument, Guid> fixture) : base(fixture)
{
}
public override string GetClassName()
{
return "CoreCRUDTKeyPartitionedTests";
}
}
}
================================================
FILE: CoreIntegrationTests/CRUDTKeyTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using System;
namespace CoreIntegrationTests
{
public class CoreTKeyTestDocument : TestDoc<Guid>
{
}
public class CRUDTKeyTests : MongoDbTKeyDocumentTestBase<CoreTKeyTestDocument, Guid>
{
public CRUDTKeyTests(MongoDbTestFixture<CoreTKeyTestDocument, Guid> fixture) : base(fixture)
{
}
public override string GetClassName()
{
return "CreateTKeyTests";
}
}
}
================================================
FILE: CoreIntegrationTests/CRUDTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using System;
namespace CoreIntegrationTests
{
public class CoreTestDocument : TestDoc
{
}
public class CRUDTests : MongoDbDocumentTestBase<CoreTestDocument>
{
public CRUDTests(MongoDbTestFixture<CoreTestDocument, Guid> fixture) : base(fixture)
{
}
public override string GetClassName()
{
return "CRUDTests";
}
}
}
================================================
FILE: CoreIntegrationTests/CoreIntegrationTests.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="[8.*,9)" />
<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.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />
</ItemGroup>
<ItemGroup>
<None Update="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MongoDbGenericRepository\MongoDbGenericRepository.csproj" />
</ItemGroup>
</Project>
================================================
FILE: CoreIntegrationTests/IdentityUserTests.cs
================================================
using CoreIntegrationTests.Infrastructure;
using MongoDbGenericRepository.Models;
using System;
using System.Collections.Generic;
using Xunit;
using Microsoft.AspNetCore.Identity;
using System.Threading.Tasks;
namespace CoreIntegrationTests
{
public class MongoIdentityUser<TKey> : IdentityUser<TKey>, IDocument<TKey>
where TKey : IEquatable<TKey>
{
public int Version { get; set; }
}
public class IdentityUserTest : MongoIdentityUser<Guid>, IDocument<Guid>
{
public IdentityUserTest()
{
Id = Guid.NewGuid();
Version = 2;
}
public string SomeContent { get; set; }
}
public class IdentityUserTests : BaseMongoDbRepositoryTests<IdentityUserTest>
{
[Fact]
public void AddOne()
{
// Arrange
var document = new IdentityUserTest();
// Act
SUT.AddOne<IdentityUserTest, Guid>(document);
// Assert
long count = SUT.Count<IdentityUserTest, Guid>(e => e.Id == document.Id);
Assert.Equal(1, count);
}
[Fact]
public async Task AddOneAsync()
{
// Arrange
var document = new IdentityUserTest();
// Act
await SUT.AddOneAsync<IdentityUserTest, Guid>(document);
// Assert
long count = SUT.Count<IdentityUserTest, Guid>(e => e.Id == document.Id);
Assert.Equal(1, count);
}
[Fact]
public void AddMany()
{
// Arrange
var documents = new List<IdentityUserTest> { new IdentityUserTest(), new IdentityUserTest() };
// Act
SUT.AddMany<IdentityUserTest, Guid>(documents);
// Assert
long count = SUT.Count<IdentityUserTest, Guid>(e => e.Id == documents[0].Id || e.Id == documents[1].Id);
Assert.Equal(2, count);
}
[Fact]
public async Task AddManyAsync()
{
// Arrange
var documents = new List<IdentityUserTest> { new IdentityUserTest(), new IdentityUserTest() };
// Act
await SUT.AddManyAsync<IdentityUserTest, Guid>(documents);
// Assert
long count = SUT.Count<IdentityUserTest, Guid>(e => e.Id == documents[0].Id || e.Id == documents[1].Id);
Assert.Equal(2, count);
}
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/BaseMongoDbRepositoryTests.cs
================================================
using MongoDbGenericRepository.Models;
using System.Collections.Generic;
using System;
namespace CoreIntegrationTests.Infrastructure
{
public class BaseMongoDbRepositoryTests<T> : IDisposable where T : new()
{
public T CreateTestDocument()
{
return new T();
}
public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
{
var docs = new List<T>();
for(var i = 0; i < numberOfDocumentsToCreate; i++)
{
docs.Add(new T());
}
return docs;
}
/// <summary>
/// Constructor, init code
/// </summary>
public BaseMongoDbRepositoryTests()
{
Init();
var type = CreateTestDocument();
if (type is IPartitionedDocument)
{
PartitionKey = ((IPartitionedDocument)type).PartitionKey;
}
}
public string PartitionKey { get; set; }
/// <summary>
/// SUT: System Under Test
/// </summary>
protected static ITestRepository SUT { get; set; }
public void Init()
{
MongoDbConfig.EnsureConfigured();
SUT = TestRepository.Instance;
}
public void Cleanup()
{
// We drop the collection at the end of each test session.
if (!string.IsNullOrEmpty(PartitionKey))
{
SUT.DropTestCollection<T>(PartitionKey);
}
else
{
SUT.DropTestCollection<T>();
}
}
#region IDisposable Support
private bool _disposedValue; // Pour détecter les appels redondants
protected virtual void Dispose(bool disposing)
{
if (!_disposedValue)
{
if (disposing)
{
Cleanup();
}
_disposedValue = true;
}
}
// Ce code est ajouté pour implémenter correctement le modèle supprimable.
public void Dispose()
{
// Ne modifiez pas ce code. Placez le code de nettoyage dans Dispose(bool disposing) ci-dessus.
Dispose(true);
}
#endregion
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/GlobalVariables.cs
================================================
using System;
namespace CoreIntegrationTests.Infrastructure
{
/// <summary>
/// A class holding global variables.
/// </summary>
public static class GlobalVariables
{
/// <summary>
/// A random number generator.
/// </summary>
public static Random Random = new Random();
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/ITestRepository.cs
================================================
using MongoDbGenericRepository;
namespace CoreIntegrationTests
{
public interface ITestRepository : IBaseMongoRepository
{
void DropTestCollection<TDocument>();
void DropTestCollection<TDocument>(string partitionKey);
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/MongoDbConfig.cs
================================================
using MongoDB.Bson.Serialization.Conventions;
using System.Threading;
namespace CoreIntegrationTests.Infrastructure
{
internal static class MongoDbConfig
{
private static bool _initialized;
private static object _initializationLock = new();
private static object _initializationTarget;
public static void EnsureConfigured()
{
EnsureConfiguredImpl();
}
private static void EnsureConfiguredImpl()
{
LazyInitializer.EnsureInitialized(ref _initializationTarget, ref _initialized, ref _initializationLock, () =>
{
Configure();
return null;
});
}
private static void Configure()
{
RegisterConventions();
}
private static void RegisterConventions()
{
var pack = new ConventionPack
{
new IgnoreIfNullConvention(false),
new CamelCaseElementNameConvention(),
};
}
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.Main.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using MongoDbGenericRepository.Models;
using Xunit;
namespace CoreIntegrationTests.Infrastructure
{
public abstract partial class MongoDbDocumentTestBase<T>
where T : TestDoc, new()
{
private readonly MongoDbTestFixture<T, Guid> _fixture;
protected MongoDbDocumentTestBase(MongoDbTestFixture<T, Guid> fixture)
{
_fixture = fixture;
var type = CreateTestDocument();
DocumentTypeName = type.GetType().FullName;
if (type is IPartitionedDocument)
{
PartitionKey = ((IPartitionedDocument)type).PartitionKey;
}
_fixture.PartitionKey = PartitionKey;
TestClassName = GetClassName();
MongoDbConfig.EnsureConfigured();
SUT = TestTKeyRepository<Guid>.Instance;
}
protected T CreateTestDocument()
{
return _fixture.CreateTestDocument();
}
public abstract string GetClassName();
protected List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
{
return _fixture.CreateTestDocuments(numberOfDocumentsToCreate);
}
/// <summary>
/// The partition key for the collection, if any
/// </summary>
protected string PartitionKey { get; set; }
/// <summary>
/// the name of the test class
/// </summary>
protected string TestClassName { get; set; }
/// <summary>
/// The name of the document used for tests
/// </summary>
protected string DocumentTypeName { get; set; }
/// <summary>
/// SUT: System Under Test
/// </summary>
protected static ITestRepository<Guid> SUT { get; set; }
#region Add
[Fact]
public void AddOne()
{
// Arrange
var document = CreateTestDocument();
// Act
SUT.AddOne(document);
// 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.True(1 == count, GetTestName());
}
[Fact]
public async Task AddOneAsync()
{
// Arrange
var document = CreateTestDocument();
// Act
await SUT.AddOneAsync(document);
// 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.True(1 == count, GetTestName());
}
[Fact]
public void AddMany()
{
// Arrange
var documents = CreateTestDocuments(2);
// Act
SUT.AddMany(documents);
// Assert
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T>(e => e.Id.Equals(documents[0].Id)
|| e.Id.Equals(documents[1].Id))
: SUT.Count<T>(e => e.Id.Equals(documents[0].Id)
|| e.Id.Equals(documents[1].Id), PartitionKey);
Assert.True(2 == count, GetTestName());
}
[Fact]
public void AddManyWithDifferentPartitionKey()
{
// only run this test for tests on documents with partition key
if (!string.IsNullOrEmpty(PartitionKey))
{
// Arrange
var documents = CreateTestDocuments(4);
if (documents.Any(e => e is IPartitionedDocument))
{
var secondPartitionKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[2]).PartitionKey = secondPartitionKey;
((IPartitionedDocument)documents[3]).PartitionKey = secondPartitionKey;
// Act
SUT.AddMany(documents);
// Assert
long count = SUT.Count<T>(e => e.Id.Equals(documents[0].Id) || e.Id.Equals(documents[1].Id), PartitionKey);
long secondPartitionCount = SUT.Count<T>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
// Cleanup second partition
SUT.DeleteMany<T>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
Assert.True(2 == count, GetTestName());
Assert.True(2 == secondPartitionCount, GetTestName());
}
}
}
[Fact]
public async Task AddManyAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
// Act
await SUT.AddManyAsync(documents);
// Assert
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T>(e => e.Id.Equals(documents[0].Id)
|| e.Id.Equals(documents[1].Id))
: SUT.Count<T>(e => e.Id.Equals(documents[0].Id)
|| e.Id.Equals(documents[1].Id), PartitionKey);
Assert.True(2 == count, GetTestName());
}
[Fact]
public async Task AddManyAsyncWithDifferentPartitionKey()
{
// only run this test for tests on documents with partition key
if (!string.IsNullOrEmpty(PartitionKey))
{
// Arrange
var documents = CreateTestDocuments(4);
if (documents.Any(e => e is IPartitionedDocument))
{
var secondPartitionKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[2]).PartitionKey = secondPartitionKey;
((IPartitionedDocument)documents[3]).PartitionKey = secondPartitionKey;
// Act
await SUT.AddManyAsync(documents);
// Assert
long count = SUT.Count<T>(e => e.Id.Equals(documents[0].Id) || e.Id.Equals(documents[1].Id), PartitionKey);
long secondPartitionCount = SUT.Count<T>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
// Cleanup second partition
SUT.DeleteMany<T>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
Assert.True(2 == count, GetTestName());
Assert.True(2 == secondPartitionCount, GetTestName());
}
}
}
#endregion Add
#region Read
[Fact]
public async Task GetByIdAsync()
{
// Arrange
var document = CreateTestDocument();
await SUT.AddOneAsync(document);
// Act
var result = await SUT.GetByIdAsync<T>(document.Id, PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetById()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = SUT.GetById<T>(document.Id, PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public async Task GetOneAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = await SUT.GetOneAsync<T>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetOne()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = SUT.GetOne<T>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetCursor()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var cursor = SUT.GetCursor<T>(x => x.Id.Equals(document.Id), PartitionKey);
var count = cursor.CountDocuments();
// Assert
Assert.True(1 == count, GetTestName());
}
[Fact]
public async Task AnyAsyncReturnsTrue()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = await SUT.AnyAsync<T>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(result, GetTestName());
}
[Fact]
public async Task AnyAsyncReturnsFalse()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = await SUT.AnyAsync<T>(x => x.Id.Equals(Guid.NewGuid()), PartitionKey);
// Assert
Assert.False(result, GetTestName());
}
[Fact]
public void AnyReturnsTrue()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = SUT.Any<T>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(result, GetTestName());
}
[Fact]
public void AnyReturnsFalse()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = SUT.Any<T>(x => x.Id.Equals(Guid.NewGuid()), PartitionKey);
// Assert
Assert.False(result, GetTestName());
}
[Fact]
public async Task GetAllAsync()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany(documents);
// Act
var result = await SUT.GetAllAsync<T>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
}
[Fact]
public void GetAll()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany(documents);
// Act
var result = SUT.GetAll<T>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
}
[Fact]
public async Task CountAsync()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany(documents);
// Act
var result = await SUT.CountAsync<T>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result, GetTestName());
}
[Fact]
public void Count()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany(documents);
// Act
var result = SUT.Count<T>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result, GetTestName());
}
#endregion Read
#region Delete
[Fact]
public void DeleteOne()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = SUT.DeleteOne(document);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public void DeleteOneLinq()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = SUT.DeleteOne<T>(e => e.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteOneAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = await SUT.DeleteOneAsync(document);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteOneAsyncLinq()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne(document);
// Act
var result = await SUT.DeleteOneAsync<T>(e => e.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteManyAsyncLinq()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
SUT.AddMany(documents);
// Act
var result = await SUT.DeleteManyAsync<T>(e => e.SomeContent == criteria, PartitionKey);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteManyAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
var canPartition = !string.IsNullOrEmpty(PartitionKey) && documents.Any(e => e is IPartitionedDocument);
string secondKey = null;
if (canPartition)
{
secondKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[3]).PartitionKey = secondKey;
((IPartitionedDocument)documents[4]).PartitionKey = secondKey;
}
SUT.AddMany(documents);
// Act
var result = await SUT.DeleteManyAsync(documents);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
if (canPartition)
{
Assert.False(SUT.Any<T>(e => e.SomeContent == criteria, secondKey), GetTestName());
}
}
[Fact]
public void DeleteManyLinq()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
SUT.AddMany(documents);
// Act
var result = SUT.DeleteMany<T>(e => e.SomeContent == criteria, PartitionKey);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
}
[Fact]
public void DeleteMany()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
var canPartition = !string.IsNullOrEmpty(PartitionKey) && documents.Any(e => e is IPartitionedDocument);
string secondKey = null;
if (canPartition)
{
secondKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[3]).PartitionKey = secondKey;
((IPartitionedDocument)documents[4]).PartitionKey = secondKey;
}
SUT.AddMany(documents);
// Act
var result = SUT.DeleteMany(documents);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
if (canPartition)
{
Assert.False(SUT.Any<T>(e => e.SomeContent == criteria, secondKey), GetTestName());
}
}
#endregion Delete
#region Project
[Fact]
public async Task ProjectOneAsync()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var document = CreateTestDocument();
document.SomeContent = someContent;
document.Nested.SomeDate = someDate;
SUT.AddOne(document);
// Act
var result = await SUT.ProjectOneAsync<T, MyTestProjection>(
x => x.Id.Equals(document.Id),
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
Assert.True(someContent == result.SomeContent, GetTestName());
Assert.True(someDate.Minute == result.SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.SomeDate.Second, GetTestName());
}
[Fact]
public void ProjectOne()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var document = CreateTestDocument();
document.SomeContent = someContent;
document.Nested.SomeDate = someDate;
SUT.AddOne(document);
// Act
var result = SUT.ProjectOne<T, MyTestProjection>(
x => x.Id.Equals(document.Id),
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
Assert.True(someContent == result.SomeContent, GetTestName());
Assert.True(someDate.Minute == result.SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.SomeDate.Second, GetTestName());
}
[Fact]
public async Task ProjectManyAsync()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var documents = CreateTestDocuments(5);
documents.ForEach(e =>
{
e.SomeContent = someContent;
e.Nested.SomeDate = someDate;
});
SUT.AddMany(documents);
// Act
var result = await SUT.ProjectManyAsync<T, MyTestProjection>(
x => x.SomeContent == someContent,
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
Assert.True(someContent == result.First().SomeContent, GetTestName());
Assert.True(someDate.Minute == result.First().SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.First().SomeDate.Second, GetTestName());
}
[Fact]
public void ProjectMany()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var documents = CreateTestDocuments(5);
documents.ForEach(e =>
{
e.SomeContent = someContent;
e.Nested.SomeDate = someDate;
});
SUT.AddMany(documents);
// Act
var result = SUT.ProjectMany<T, MyTestProjection>(
x => x.SomeContent == someContent,
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
Assert.True(someContent == result.First().SomeContent, GetTestName());
Assert.True(someDate.Minute == result.First().SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.First().SomeDate.Second, GetTestName());
}
#endregion Project
#region Max / Min Queries
[Fact]
public async Task GetByMaxAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetByMaxAsync<T>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMax.Id, result.Id);
}
[Fact]
public void GetByMax()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetByMax<T>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMax.Id, result.Id);
}
[Fact]
public async Task GetByMinAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetByMinAsync<T>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMin.Id, result.Id);
}
[Fact]
public void GetByMin()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetByMin<T>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMin.Id, result.Id);
}
[Fact]
public void GetMinValue()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetMinValue<T, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.True(result != default(DateTime));
Assert.Equal(expectedMin.Nested.SomeDate.Date, result.Date);
}
[Fact]
public async Task GetMinValueAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetMinValueAsync<T, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.True(result != default(DateTime));
Assert.Equal(expectedMin.Nested.SomeDate.Date, result.Date);
}
[Fact]
public void GetMaxValue()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetMaxValue<T, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.True(result != default(DateTime));
Assert.Equal(expectedMax.Nested.SomeDate.Date, result.Date);
}
[Fact]
public async Task GetMaxValueAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedMin = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetMaxValueAsync<T, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.True(result != default(DateTime));
Assert.Equal(expectedMin.Nested.SomeDate.Date, result.Date);
}
#endregion Max / Min Queries
#region Index Management
static SemaphoreSlim textIndexSemaphore = new SemaphoreSlim(1, 1);
[Fact]
public async Task CreateTextIndexNoOptionAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_text";
// Act
await textIndexSemaphore.WaitAsync();
try
{
var result = await SUT.CreateTextIndexAsync<T>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
}
finally
{
textIndexSemaphore.Release();
}
}
[Fact]
public async Task CreateTextIndexWithOptionAsync()
{
// Arrange
string expectedIndexName = $"{Guid.NewGuid()}";
var option = new IndexCreationOptions
{
Name = expectedIndexName
};
await textIndexSemaphore.WaitAsync();
try
{
// Act
var result = await SUT.CreateTextIndexAsync<T>(x => x.AddedAtUtc, option, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
}
finally
{
textIndexSemaphore.Release();
}
}
[Fact]
public async Task CreateAscendingIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_1";
// Act
var result = await SUT.CreateAscendingIndexAsync<T>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
}
[Fact]
public async Task CreateDescendingIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_-1";
// Act
var result = await SUT.CreateDescendingIndexAsync<T>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
}
[Fact]
public async Task CreateHashedIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_hashed";
// Act
var result = await SUT.CreateHashedIndexAsync<T>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
}
[Fact]
public async Task CreateCombinedTextIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent2_text_SomeContent3_text";
// Act
Expression <Func<T, object>> ex = x => x.SomeContent2;
Expression <Func<T, object>> ex2 = x => x.SomeContent3;
var result = await SUT.CreateCombinedTextIndexAsync(new[] { ex, ex2 }, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T>(expectedIndexName, PartitionKey);
}
#endregion Index Management
#region Math
[Fact]
public async Task SumByDecimalAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.Nested.SomeAmount = 5m;
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedSum = documents.Sum(e => e.Nested.SomeAmount);
// Act
var result = await SUT.SumByAsync<T>(e => e.SomeContent == criteria, e => e.Nested.SomeAmount, PartitionKey);
// Assert
Assert.Equal(expectedSum, result);
}
[Fact]
public void SumByDecimal()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.Nested.SomeAmount = 5m;
e.SomeContent = criteria;
});
SUT.AddMany(documents);
var expectedSum = documents.Sum(e => e.Nested.SomeAmount);
// Act
var result = SUT.SumBy<T>(e => e.SomeContent == criteria, e => e.Nested.SomeAmount, PartitionKey);
// Assert
Assert.Equal(expectedSum, result);
}
#endregion Math
#region Test Utils
[MethodImpl(MethodImplOptions.NoInlining)]
private string GetCurrentMethod()
{
StackTrace st = new StackTrace();
StackFrame sf = st.GetFrame(1);
return sf.GetMethod().Name;
}
[MethodImpl(MethodImplOptions.NoInlining)]
private string GetParentMethod()
{
StackTrace st = new StackTrace();
StackFrame sf = st.GetFrame(2);
var method = sf.GetMethod().DeclaringType.Name;
return method;
}
private string GetTestName()
{
return $"{TestClassName}{PartitionKey}.{GetParentMethod()}";
}
private string GetContent()
{
return $"{TestClassName}{PartitionKey}.{Guid.NewGuid()}.{GetParentMethod()}";
}
private void Cleanup()
{
// We drop the collection at the end of each test session.
if (!string.IsNullOrEmpty(PartitionKey))
{
SUT.DropTestCollection<T>(PartitionKey);
}
else
{
SUT.DropTestCollection<T>();
}
}
#endregion Test Utils
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.Update.cs
================================================
using MongoDB.Driver;
using MongoDbGenericRepository;
using MongoDbGenericRepository.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace CoreIntegrationTests.Infrastructure
{
public abstract partial class MongoDbDocumentTestBase<T> :
IClassFixture<MongoDbTestFixture<T, Guid>>
where T : TestDoc, new()
{
#region Update One
[Fact]
public void UpdateOne()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var content = GetContent();
document.SomeContent = content;
// Act
var result = SUT.UpdateOne<T>(document);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var content = GetContent();
document.SomeContent = content;
// Act
var result = await SUT.UpdateOneAsync<T>(document);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public void UpdateOneField()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var content = GetContent();
// Act
var result = SUT.UpdateOne<T, string>(document, x => x.SomeContent, content);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneFieldAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var content = GetContent();
// Act
var result = await SUT.UpdateOneAsync<T, string>(document, x => x.SomeContent, content);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public void UpdateOneFieldWithFilter()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var content = GetContent();
// Act
var result = SUT.UpdateOne<T, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneFieldWithFilterAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var content = GetContent();
// Act
var result = await SUT.UpdateOneAsync<T, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneAsyncWithUpdateDefinition()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = MongoDB.Driver.Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
// Act
var result = await SUT.UpdateOneAsync<T>(document, updateDef);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument);
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
}
[Fact]
public void UpdateOneWithUpdateDefinition()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T>(document);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = MongoDB.Driver.Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
// Act
var result = SUT.UpdateOne<T>(document, updateDef);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T>(document.Id, PartitionKey);
Assert.True(null != updatedDocument);
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
}
#endregion Update One
#region Update Many
[Fact]
public async Task UpdateManyWithLinqFilterAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T, string>(x => docIds.Contains(x.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public async Task UpdateManyWithFilterDefinitionAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T, string>(filterDefinition, x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public async Task UpdateManyWithLinqFilterAndUpdateDefinitionAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T>(x => docIds.Contains(x.Id), updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
[Fact]
public async Task UpdateManyWithFilterAndUpdateDefinitionsAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T>(filterDefinition, updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
[Fact]
public void UpdateManyWithLinqFilter()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var content = GetContent();
// Act
var result = SUT.UpdateMany<T, string>(x => docIds.Contains(x.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public void UpdateManyWithFilterDefinition()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = SUT.UpdateMany<T, string>(filterDefinition, x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public void UpdateManyWithLinqFilterAndUpdateDefinition()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var content = GetContent();
// Act
var result = SUT.UpdateMany<T>(x => docIds.Contains(x.Id), updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
[Fact]
public void UpdateManyWithFilterAndUpdateDefinitions()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T>(documents);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = SUT.UpdateMany<T>(filterDefinition, updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
#endregion Update Many
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.Main.cs
================================================
using MongoDB.Driver;
using MongoDbGenericRepository.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace CoreIntegrationTests.Infrastructure
{
public abstract partial class MongoDbTKeyDocumentTestBase<T, TKey> :
IClassFixture<MongoDbTestFixture<T, TKey>>
where T : TestDoc<TKey>, new()
where TKey : IEquatable<TKey>
{
private readonly MongoDbTestFixture<T, TKey> _fixture;
protected MongoDbTKeyDocumentTestBase(MongoDbTestFixture<T, TKey> fixture)
{
_fixture = fixture;
var type = CreateTestDocument();
DocumentTypeName = type.GetType().FullName;
if (type is IPartitionedDocument)
{
PartitionKey = ((IPartitionedDocument)type).PartitionKey;
}
_fixture.PartitionKey = PartitionKey;
TestClassName = GetClassName();
MongoDbConfig.EnsureConfigured();
SUT = TestRepository.Instance;
}
public abstract string GetClassName();
public T CreateTestDocument()
{
return _fixture.CreateTestDocument();
}
public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
{
return _fixture.CreateTestDocuments(numberOfDocumentsToCreate);
}
/// <summary>
/// The partition key for the collection, if any
/// </summary>
protected string PartitionKey { get; set; }
/// <summary>
/// the name of the test class
/// </summary>
protected string TestClassName { get; set; }
/// <summary>
/// The name of the document used for tests
/// </summary>
protected string DocumentTypeName { get; set; }
/// <summary>
/// SUT: System Under Test
/// </summary>
protected static ITestRepository SUT { get; set; }
#region Add
[Fact]
public void AddOne()
{
// Arrange
var document = CreateTestDocument();
// Act
SUT.AddOne<T, TKey>(document);
// 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.True(1 == count, GetTestName());
}
[Fact]
public async Task AddOneAsync()
{
// Arrange
var document = CreateTestDocument();
// Act
await SUT.AddOneAsync<T, TKey>(document);
// 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.True(1 == count, GetTestName());
}
[Fact]
public void AddMany()
{
// Arrange
var documents = CreateTestDocuments(2);
// Act
SUT.AddMany<T, TKey>(documents);
// Assert
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T, TKey>(e => e.Id.Equals(documents[0].Id)
|| 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.True(2 == count, GetTestName());
}
[Fact]
public void AddManyWithDifferentPartitionKey()
{
// only run this test for tests on documents with partition key
if (!string.IsNullOrEmpty(PartitionKey))
{
// Arrange
var documents = CreateTestDocuments(4);
if (documents.Any(e => e is IPartitionedDocument))
{
var secondPartitionKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[2]).PartitionKey = secondPartitionKey;
((IPartitionedDocument)documents[3]).PartitionKey = secondPartitionKey;
// Act
SUT.AddMany<T, TKey>(documents);
// Assert
long count = SUT.Count<T, TKey>(e => e.Id.Equals(documents[0].Id) || e.Id.Equals(documents[1].Id), PartitionKey);
long secondPartitionCount = SUT.Count<T, TKey>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
// Cleanup second partition
SUT.DeleteMany<T, TKey>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
Assert.True(2 == count, GetTestName());
Assert.True(2 == secondPartitionCount, GetTestName());
}
}
}
[Fact]
public async Task AddManyAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
// Act
await SUT.AddManyAsync<T, TKey>(documents);
// Assert
long count = string.IsNullOrEmpty(PartitionKey) ? SUT.Count<T, TKey>(e => e.Id.Equals(documents[0].Id)
|| 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.True(2 == count, GetTestName());
}
[Fact]
public async Task AddManyAsyncWithDifferentPartitionKey()
{
// only run this test for tests on documents with partition key
if (!string.IsNullOrEmpty(PartitionKey))
{
// Arrange
var documents = CreateTestDocuments(4);
if (documents.Any(e => e is IPartitionedDocument))
{
var secondPartitionKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[2]).PartitionKey = secondPartitionKey;
((IPartitionedDocument)documents[3]).PartitionKey = secondPartitionKey;
// Act
await SUT.AddManyAsync<T, TKey>(documents);
// Assert
long count = SUT.Count<T, TKey>(e => e.Id.Equals(documents[0].Id) || e.Id.Equals(documents[1].Id), PartitionKey);
long secondPartitionCount = SUT.Count<T, TKey>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
// Cleanup second partition
SUT.DeleteMany<T, TKey>(e => e.Id.Equals(documents[2].Id) || e.Id.Equals(documents[3].Id), secondPartitionKey);
Assert.True(2 == count, GetTestName());
Assert.True(2 == secondPartitionCount, GetTestName());
}
}
}
#endregion Add
#region Read
[Fact]
public async Task GetByIdAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.GetByIdAsync<T, TKey>(document.Id, PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetById()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.GetById<T, TKey>(document.Id, PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public async Task GetOneByFilterDefinitionAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.GetOneAsync<T, TKey>(Builders<T>.Filter.Eq(x => x.Id, document.Id), null, PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetOneByFilterDefinition()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.GetOne<T, TKey>(Builders<T>.Filter.Eq(x => x.Id, document.Id), null, PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public async Task GetOneAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.GetOneAsync<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetOne()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.GetOne<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
}
[Fact]
public void GetCursor()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var cursor = SUT.GetCursor<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
var count = cursor.CountDocuments();
// Assert
Assert.True(1 == count, GetTestName());
}
[Fact]
public async Task AnyAsyncByDefinitionReturnsTrue()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.AnyAsync<T, TKey>(Builders<T>.Filter.Eq(x => x.Id, document.Id), null, PartitionKey);
// Assert
Assert.True(result, GetTestName());
}
[Fact]
public async Task AnyAsyncByDefinitionReturnsFalse()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.AnyAsync<T, TKey>(Builders<T>.Filter.Eq(x => x.Id, document.Init<TKey>()), null, PartitionKey);
// Assert
Assert.False(result, GetTestName());
}
[Fact]
public async Task AnyAsyncReturnsTrue()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.AnyAsync<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(result, GetTestName());
}
[Fact]
public async Task AnyAsyncReturnsFalse()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.AnyAsync<T, TKey>(x => x.Id.Equals(document.Init<TKey>()), PartitionKey);
// Assert
Assert.False(result, GetTestName());
}
[Fact]
public void AnyByDefinitionReturnsTrue()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.Any<T, TKey>(Builders<T>.Filter.Eq(x => x.Id, document.Id), null, PartitionKey);
// Assert
Assert.True(result, GetTestName());
}
[Fact]
public void AnyByDefinitionReturnsFalse()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.Any<T, TKey>(Builders<T>.Filter.Eq(x => x.Id, document.Init<TKey>()), null, PartitionKey);
// Assert
Assert.False(result, GetTestName());
}
[Fact]
public void AnyReturnsTrue()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.Any<T, TKey>(x => x.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(result, GetTestName());
}
[Fact]
public void AnyReturnsFalse()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.Any<T, TKey>(x => x.Id.Equals(document.Init<TKey>()), PartitionKey);
// Assert
Assert.False(result, GetTestName());
}
[Fact]
public async Task GetAllByDefinitionAsync()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.GetAllAsync<T, TKey>(Builders<T>.Filter.Eq(x => x.SomeContent, content), null, PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
}
[Fact]
public void GetAllByDefinition()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.GetAll<T, TKey>(Builders<T>.Filter.Eq(x => x.SomeContent, content), null, PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
}
[Fact]
public async Task GetAllAsync()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.GetAllAsync<T, TKey>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
}
[Fact]
public void GetAll()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.GetAll<T, TKey>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
}
[Fact]
public async Task CountByDefinitionAsync()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.CountAsync<T, TKey>(Builders<T>.Filter.Eq(x => x.SomeContent, content), null, PartitionKey);
// Assert
Assert.True(5 == result, GetTestName());
}
[Fact]
public void CountByDefinition()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.Count<T, TKey>(Builders<T>.Filter.Eq(x => x.SomeContent, content), null, PartitionKey);
// Assert
Assert.True(5 == result, GetTestName());
}
[Fact]
public async Task CountAsync()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.CountAsync<T, TKey>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result, GetTestName());
}
[Fact]
public void Count()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
documents.ForEach(e => e.SomeContent = content);
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.Count<T, TKey>(x => x.SomeContent == content, PartitionKey);
// Assert
Assert.True(5 == result, GetTestName());
}
#endregion Read
#region Delete
[Fact]
public void DeleteOne()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.DeleteOne<T, TKey>(document);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public void DeleteOneLinq()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.DeleteOne<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteOneAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.DeleteOneAsync<T, TKey>(document);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteOneAsyncLinq()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.DeleteOneAsync<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey);
// Assert
Assert.True(1 == result);
Assert.False(SUT.Any<T, TKey>(e => e.Id.Equals(document.Id), PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteManyAsyncLinq()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.DeleteManyAsync<T, TKey>(e => e.SomeContent == criteria, PartitionKey);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
}
[Fact]
public async Task DeleteManyAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
var canPartition = !string.IsNullOrEmpty(PartitionKey) && documents.Any(e => e is IPartitionedDocument);
string secondKey = null;
if (canPartition)
{
secondKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[3]).PartitionKey = secondKey;
((IPartitionedDocument)documents[4]).PartitionKey = secondKey;
}
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.DeleteManyAsync<T, TKey>(documents);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
if (canPartition)
{
Assert.False(SUT.Any<T, TKey>(e => e.SomeContent == criteria, secondKey), GetTestName());
}
}
[Fact]
public void DeleteManyLinq()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.DeleteMany<T, TKey>(e => e.SomeContent == criteria, PartitionKey);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
}
[Fact]
public void DeleteMany()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}";
var documents = CreateTestDocuments(5);
documents.ForEach(e => e.SomeContent = criteria);
var canPartition = !string.IsNullOrEmpty(PartitionKey) && documents.Any(e => e is IPartitionedDocument);
string secondKey = null;
if (canPartition)
{
secondKey = $"{PartitionKey}-2";
((IPartitionedDocument)documents[3]).PartitionKey = secondKey;
((IPartitionedDocument)documents[4]).PartitionKey = secondKey;
}
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.DeleteMany<T, TKey>(documents);
// Assert
Assert.True(5 == result);
Assert.False(SUT.Any<T, TKey>(e => e.SomeContent == criteria, PartitionKey), GetTestName());
if (canPartition)
{
Assert.False(SUT.Any<T, TKey>(e => e.SomeContent == criteria, secondKey), GetTestName());
}
}
#endregion Delete
#region Project
[Fact]
public async Task ProjectOneAsync()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var document = CreateTestDocument();
document.SomeContent = someContent;
document.Nested.SomeDate = someDate;
SUT.AddOne<T, TKey>(document);
// Act
var result = await SUT.ProjectOneAsync<T, MyTestProjection, TKey>(
x => x.Id.Equals(document.Id),
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
Assert.True(someContent == result.SomeContent, GetTestName());
Assert.True(someDate.Minute == result.SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.SomeDate.Second, GetTestName());
}
[Fact]
public void ProjectOne()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var document = CreateTestDocument();
document.SomeContent = someContent;
document.Nested.SomeDate = someDate;
SUT.AddOne<T, TKey>(document);
// Act
var result = SUT.ProjectOne<T, MyTestProjection, TKey>(
x => x.Id.Equals(document.Id),
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
Assert.True(someContent == result.SomeContent, GetTestName());
Assert.True(someDate.Minute == result.SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.SomeDate.Second, GetTestName());
}
[Fact]
public async Task ProjectManyAsync()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var documents = CreateTestDocuments(5);
documents.ForEach(e =>
{
e.SomeContent = someContent;
e.Nested.SomeDate = someDate;
});
SUT.AddMany<T, TKey>(documents);
// Act
var result = await SUT.ProjectManyAsync<T, MyTestProjection, TKey>(
x => x.SomeContent == someContent,
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
Assert.True(someContent == result.First().SomeContent, GetTestName());
Assert.True(someDate.Minute == result.First().SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.First().SomeDate.Second, GetTestName());
}
[Fact]
public void ProjectMany()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var documents = CreateTestDocuments(5);
documents.ForEach(e =>
{
e.SomeContent = someContent;
e.Nested.SomeDate = someDate;
});
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.ProjectMany<T, MyTestProjection, TKey>(
x => x.SomeContent == someContent,
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(5 == result.Count, GetTestName());
Assert.True(someContent == result.First().SomeContent, GetTestName());
Assert.True(someDate.Minute == result.First().SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.First().SomeDate.Second, GetTestName());
}
#endregion Project
#region Max / Min Queries
[Fact]
public async Task GetByMaxAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetByMaxAsync<T, TKey>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMax.Id, result.Id);
}
[Fact]
public void GetByMax()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetByMax<T, TKey>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMax.Id, result.Id);
}
[Fact]
public void GetMaxValue()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetMaxValue<T, TKey, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.False(result == default(DateTime));
Assert.Equal(expectedMax.Nested.SomeDate.Date, result.Date);
}
[Fact]
public async Task GetMaxValueAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMax = documents.OrderByDescending(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetMaxValueAsync<T, TKey, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.False(result == default(DateTime));
Assert.Equal(expectedMax.Nested.SomeDate.Date, result.Date);
}
[Fact]
public async Task GetByMinAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetByMinAsync<T, TKey>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMin.Id, result.Id);
}
[Fact]
public void GetByMin()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetByMin<T, TKey>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.NotNull(result);
Assert.Equal(expectedMin.Id, result.Id);
}
[Fact]
public void GetMinValue()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = SUT.GetMinValue<T, TKey, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.True(result != default(DateTime));
Assert.Equal(expectedMin.Nested.SomeDate.Date, result.Date);
}
[Fact]
public async Task GetMinValueAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedMin = documents.OrderBy(e => e.Nested.SomeDate).First();
// Act
var result = await SUT.GetMinValueAsync<T, TKey, DateTime>(e => e.SomeContent == criteria, e => e.Nested.SomeDate, PartitionKey);
// Assert
Assert.True(result != default(DateTime));
Assert.Equal(expectedMin.Nested.SomeDate.Date, result.Date);
}
#endregion Max / Min Queries
#region Index Management
static readonly SemaphoreSlim textIndexSemaphore = new SemaphoreSlim(1, 1);
[Fact]
public async Task CreateTextIndexNoOptionAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_text";
// Act
await textIndexSemaphore.WaitAsync();
try
{
var result = await SUT.CreateTextIndexAsync<T, TKey>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
}
finally
{
textIndexSemaphore.Release();
}
}
[Fact]
public async Task CreateTextIndexWithOptionAsync()
{
// Arrange
string expectedIndexName = $"{Guid.NewGuid()}";
var option = new IndexCreationOptions
{
Name = expectedIndexName
};
await textIndexSemaphore.WaitAsync();
try
{
// Act
var result = await SUT.CreateTextIndexAsync<T, TKey>(x => x.Version, option, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
}
finally
{
textIndexSemaphore.Release();
}
}
[Fact]
public async Task CreateAscendingIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_1";
// Act
var result = await SUT.CreateAscendingIndexAsync<T, TKey>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
}
[Fact]
public async Task CreateDescendingIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_-1";
// Act
var result = await SUT.CreateDescendingIndexAsync<T, TKey>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
}
[Fact]
public async Task CreateHashedIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent_hashed";
// Act
var result = await SUT.CreateHashedIndexAsync<T, TKey>(x => x.SomeContent, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
}
[Fact]
public async Task CreateCombinedTextIndexAsync()
{
// Arrange
const string expectedIndexName = "SomeContent4_text_SomeContent5_text";
// Act
Expression<Func<T, object>> ex = x => x.SomeContent4;
Expression<Func<T, object>> ex2 = x => x.SomeContent5;
var result = await SUT.CreateCombinedTextIndexAsync<T, TKey>(new[] { ex, ex2 }, null, PartitionKey);
// Assert
var listOfIndexNames = await SUT.GetIndexesNamesAsync<T, TKey>(PartitionKey);
Assert.Contains(expectedIndexName, listOfIndexNames);
// Cleanup
await SUT.DropIndexAsync<T, TKey>(expectedIndexName, PartitionKey);
}
#endregion Index Management
#region Math
[Fact]
public async Task SumByDecimalAsync()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.Nested.SomeAmount = 5m;
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedSum = documents.Sum(e => e.Nested.SomeAmount);
// Act
var result = await SUT.SumByAsync<T, TKey>(e => e.SomeContent == criteria, e => e.Nested.SomeAmount, PartitionKey);
// Assert
Assert.Equal(expectedSum, result);
}
[Fact]
public void SumByDecimal()
{
// Arrange
var criteria = $"{GetTestName()}.{DocumentTypeName}.{Guid.NewGuid()}";
var documents = CreateTestDocuments(5);
var i = 1;
documents.ForEach(e =>
{
e.Nested.SomeDate = e.Nested.SomeDate.AddDays(i++);
e.Nested.SomeAmount = 5m;
e.SomeContent = criteria;
});
SUT.AddMany<T, TKey>(documents);
var expectedSum = documents.Sum(e => e.Nested.SomeAmount);
// Act
var result = SUT.SumBy<T, TKey>(e => e.SomeContent == criteria, e => e.Nested.SomeAmount, PartitionKey);
// Assert
Assert.Equal(expectedSum, result);
}
#endregion Math
#region Group By
[Fact]
public void GroupByTProjection()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
for (var i = 0; i < documents.Count - 2; i++)
{
documents[i].GroupingKey = 1;
documents[i].SomeContent = $"{content}-{i}";
}
for (var i = 3; i < documents.Count; i++)
{
documents[i].GroupingKey = 2;
documents[i].SomeContent = $"{content}-{i}";
}
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.GroupBy<T, int, ProjectedGroup, TKey>(
e => e.GroupingKey,
g => new ProjectedGroup
{
Key = g.Key,
Content = g.Select(doc => doc.SomeContent).ToList()
},
PartitionKey);
// Assert
var key1Group = result.First(e => e.Key == 1);
Assert.NotNull(key1Group);
Assert.Equal(3, key1Group.Content.Count);
var key2Group = result.First(e => e.Key == 2);
Assert.NotNull(key2Group);
Assert.Equal(2, key2Group.Content.Count);
}
[Fact]
public void FilteredGroupByTProjection()
{
// Arrange
var documents = CreateTestDocuments(5);
var content = GetContent();
for (var i = 0; i < documents.Count - 2; i++)
{
documents[i].GroupingKey = 4;
documents[i].SomeContent = $"{content}-{i}";
}
for (var i = 3; i < documents.Count; i++)
{
documents[i].GroupingKey = 5;
documents[i].SomeContent = $"{content}-{i}";
}
var guid1 = Guid.NewGuid().ToString("n");
var guid2 = Guid.NewGuid().ToString("n");
for (var i = 0; i < documents.Count - 1; i++)
{
documents[i].Children = new List<Child> {
new Child(guid1, guid2)
};
}
SUT.AddMany<T, TKey>(documents);
// Act
var result = SUT.GroupBy<T, int, ProjectedGroup, TKey>(
e => e.Children.Any(c => c.Type == guid1),
e => e.GroupingKey,
g => new ProjectedGroup
{
Key = g.Key,
Content = g.Select(doc => doc.SomeContent).ToList()
},
PartitionKey);
// Assert
var key1Group = result.First(e => e.Key == 4);
Assert.NotNull(key1Group);
Assert.Equal(3, key1Group.Content.Count);
var key2Group = result.First(e => e.Key == 5);
Assert.NotNull(key2Group);
Assert.Single(key2Group.Content);
}
#endregion Group By
#region Pagination
public static Random Random = new Random();
[Fact]
public async Task GetSortedPaginatedAsync()
{
// Arrange
var content = $"{Guid.NewGuid()}";
var documents = CreateTestDocuments(10);
for (var i = 0; i < 5; i++)
{
documents[i].GroupingKey = 8;
documents[i].Nested.SomeAmount = Random.Next(1, 500000);
documents[i].SomeContent = content;
}
for (var i = 5; i < documents.Count; i++)
{
documents[i].GroupingKey = 9;
documents[i].SomeContent = content;
}
SUT.AddMany<T, TKey>(documents);
documents = documents.OrderByDescending(e => e.Nested.SomeAmount).ToList();
var notExpected = documents.First();
var expectedFirstResult = documents[1];
// Act
var result = await SUT.GetSortedPaginatedAsync<T, TKey>(
e => e.GroupingKey == 8 && e.SomeContent == content,
e => e.Nested.SomeAmount,
false,
1,5,
PartitionKey);
// Assert
Assert.Equal(4, result.Count);
Assert.True(!result.Contains(notExpected));
Assert.Equal(expectedFirstResult.Id, result[0].Id);
}
[Fact]
public async Task GetSortedPaginatedAsyncWithSortOptions()
{
// Arrange
var content = $"{Guid.NewGuid()}";
var documents = CreateTestDocuments(10);
for (var i = 0; i < 5; i++)
{
documents[i].GroupingKey = 8;
documents[i].Nested.SomeAmount = Random.Next(1, 500000);
documents[i].SomeContent = content;
}
for (var i = 5; i < documents.Count; i++)
{
documents[i].GroupingKey = 9;
documents[i].SomeContent = content;
}
SUT.AddMany<T, TKey>(documents);
documents = documents.OrderByDescending(e => e.Nested.SomeAmount).ToList();
var notExpected = documents.First();
var expectedFirstResult = documents[1];
var sorting = Builders<T>.Sort.Descending(e => e.Nested.SomeAmount);
// Act
var result = await SUT.GetSortedPaginatedAsync<T, TKey>(
e => e.GroupingKey == 8 && e.SomeContent == content,
sorting,
1, 5,
PartitionKey);
// Assert
Assert.Equal(4, result.Count);
Assert.True(!result.Contains(notExpected));
Assert.Equal(expectedFirstResult.Id, result[0].Id);
}
#endregion Pagination
#region Test Utils
[MethodImpl(MethodImplOptions.NoInlining)]
private string GetCurrentMethod()
{
StackTrace st = new StackTrace();
StackFrame sf = st.GetFrame(1);
return sf.GetMethod().Name;
}
[MethodImpl(MethodImplOptions.NoInlining)]
private string GetParentMethod()
{
StackTrace st = new StackTrace();
StackFrame sf = st.GetFrame(2);
var method = sf.GetMethod().DeclaringType.Name;
return method;
}
private string GetTestName()
{
return $"{TestClassName}{PartitionKey}.{GetParentMethod()}";
}
private string GetContent()
{
return $"{TestClassName}{PartitionKey}.{Guid.NewGuid()}.{GetParentMethod()}";
}
private void Cleanup()
{
// We drop the collection at the end of each test session.
if (!string.IsNullOrEmpty(PartitionKey))
{
SUT.DropTestCollection<T>(PartitionKey);
}
else
{
SUT.DropTestCollection<T>();
}
}
#endregion Test Utils
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.Update.cs
================================================
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;
namespace CoreIntegrationTests.Infrastructure
{
public abstract partial class MongoDbTKeyDocumentTestBase<T, TKey> :
IClassFixture<MongoDbTestFixture<T, TKey>>
where T : TestDoc<TKey>, new()
where TKey : IEquatable<TKey>
{
#region Update One
[Fact]
public void UpdateOne()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var content = GetContent();
document.SomeContent = content;
// Act
var result = SUT.UpdateOne<T, TKey>(document);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var content = GetContent();
document.SomeContent = content;
// Act
var result = await SUT.UpdateOneAsync<T, TKey>(document);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public void UpdateOneField()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var content = GetContent();
// Act
var result = SUT.UpdateOne<T, TKey, string>(document, x => x.SomeContent, content);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneFieldAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var content = GetContent();
// Act
var result = await SUT.UpdateOneAsync<T, TKey, string>(document, x => x.SomeContent, content);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public void UpdateOneFieldWithFilter()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var content = GetContent();
// Act
var result = SUT.UpdateOne<T, TKey, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneFieldWithFilterAsync()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var content = GetContent();
// Act
var result = await SUT.UpdateOneAsync<T, TKey, string>(x => x.Id.Equals(document.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result, GetTestName());
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument, GetTestName());
Assert.True(content == updatedDocument.SomeContent, GetTestName());
}
[Fact]
public async Task UpdateOneAsyncWithUpdateDefinition()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = MongoDB.Driver.Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
// Act
var result = await SUT.UpdateOneAsync<T, TKey>(document, updateDef);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument);
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
}
[Fact]
public void UpdateOneWithUpdateDefinition()
{
// Arrange
var document = CreateTestDocument();
SUT.AddOne<T, TKey>(document);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = MongoDB.Driver.Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
// Act
var result = SUT.UpdateOne<T, TKey>(document, updateDef);
// Assert
Assert.True(result);
var updatedDocument = SUT.GetById<T, TKey>(document.Id, PartitionKey);
Assert.True(null != updatedDocument);
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
}
#endregion Update One
#region Update Many
[Fact]
public async Task UpdateManyWithLinqFilterAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T, TKey, string>(x => docIds.Contains(x.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public async Task UpdateManyWithFilterDefinitionAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T, TKey, string>(filterDefinition, x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public async Task UpdateManyWithLinqFilterAndUpdateDefinitionAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T, TKey>(x => docIds.Contains(x.Id), updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
[Fact]
public async Task UpdateManyWithFilterAndUpdateDefinitionsAsync()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = await SUT.UpdateManyAsync<T, TKey>(filterDefinition, updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
[Fact]
public void UpdateManyWithLinqFilter()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var content = GetContent();
// Act
var result = SUT.UpdateMany<T, TKey, string>(x => docIds.Contains(x.Id), x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public void UpdateManyWithFilterDefinition()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = SUT.UpdateMany<T, TKey, string>(filterDefinition, x => x.SomeContent, content, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocument = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocument.Count == 2);
Assert.True(updatedDocument.All(u => u.SomeContent == content), GetTestName());
}
[Fact]
public void UpdateManyWithLinqFilterAndUpdateDefinition()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var docIds = documents.Select(u => u.Id).ToArray();
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var content = GetContent();
// Act
var result = SUT.UpdateMany<T, TKey>(x => docIds.Contains(x.Id), updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
[Fact]
public void UpdateManyWithFilterAndUpdateDefinitions()
{
// Arrange
var documents = CreateTestDocuments(2);
SUT.AddMany<T, TKey>(documents);
var childrenToAdd = new List<Child>
{
new Child("testType1", "testValue1"),
new Child("testType2", "testValue2")
};
var updateDef = Builders<T>.Update.AddToSetEach(p => p.Children, childrenToAdd);
var docIds = documents.Select(u => u.Id).ToArray();
var filterDefinition = Builders<T>.Filter.Where(x => docIds.Contains(x.Id));
var content = GetContent();
// Act
var result = SUT.UpdateMany<T, TKey>(filterDefinition, updateDef, PartitionKey);
// Assert
Assert.True(result == 2, GetTestName());
var updatedDocuments = SUT.GetAll<T, TKey>(x => docIds.Contains(x.Id), PartitionKey);
Assert.True(updatedDocuments.Count == 2);
updatedDocuments.ForEach(updatedDocument =>
{
Assert.True(childrenToAdd[0].Type == updatedDocument.Children[0].Type, GetTestName());
Assert.True(childrenToAdd[0].Value == updatedDocument.Children[0].Value, GetTestName());
Assert.True(childrenToAdd[1].Type == updatedDocument.Children[1].Type, GetTestName());
Assert.True(childrenToAdd[1].Value == updatedDocument.Children[1].Value, GetTestName());
});
}
#endregion Update Many
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/MongoDbTestFixture.cs
================================================
using MongoDbGenericRepository;
using MongoDbGenericRepository.Models;
using System;
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>
{
public IMongoDbContext Context;
public MongoDbTestFixture()
{
}
public string PartitionKey { get; set; }
public static ConcurrentBag<T> DocsToDelete { get; set; } = new ConcurrentBag<T>();
public virtual void Dispose()
{
if (DocsToDelete.Any())
{
TestRepository.Instance.DeleteMany<T, TKey>(DocsToDelete.ToList());
}
}
public T CreateTestDocument()
{
var doc = new T();
DocsToDelete.Add(doc);
return doc;
}
public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
{
var docs = new List<T>();
for (var i = 0; i < numberOfDocumentsToCreate; i++)
{
var doc = new T();
docs.Add(doc);
DocsToDelete.Add(doc);
}
return docs;
}
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/RandomExtensions.cs
================================================
using System;
namespace CoreIntegrationTests.Infrastructure
{
// Thanks BlueRaja - Danny Pflughoeft https://stackoverflow.com/a/13095144/5103354
/// <summary>
/// Extensions for the random number generator <see cref="Random"/>
/// </summary>
public static class RandomExtensions
{
/// <summary>
/// Returns a random long from min (inclusive) to max (exclusive)
/// </summary>
/// <param name="random">The given random instance</param>
/// <param name="min">The inclusive minimum bound</param>
/// <param name="max">The exclusive maximum bound. Must be greater than min</param>
public static long NextLong(this Random random, long min, long max)
{
if (max <= min)
throw new ArgumentOutOfRangeException("max", "max must be > min!");
//Working with ulong so that modulo works correctly with values > long.MaxValue
ulong uRange = (ulong)(max - min);
//Prevent a modulo bias; see https://stackoverflow.com/a/10984975/238419
//for more information.
//In the worst case, the expected number of calls is 2 (though usually it's
//much closer to 1) so this loop doesn't really hurt performance at all.
ulong ulongRand;
do
{
byte[] buf = new byte[8];
random.NextBytes(buf);
ulongRand = (ulong)BitConverter.ToInt64(buf, 0);
} while (ulongRand > ulong.MaxValue - ((ulong.MaxValue % uRange) + 1) % uRange);
return (long)(ulongRand % uRange) + min;
}
/// <summary>
/// Returns a random long from 0 (inclusive) to max (exclusive)
/// </summary>
/// <param name="random">The given random instance</param>
/// <param name="max">The exclusive maximum bound. Must be greater than 0</param>
public static long NextLong(this Random random, long max)
{
return random.NextLong(0, max);
}
/// <summary>
/// Returns a random long over all possible values of long (except long.MaxValue, similar to
/// random.Next())
/// </summary>
/// <param name="random">The given random instance</param>
public static long NextLong(this Random random)
{
return random.NextLong(long.MinValue, long.MaxValue);
}
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/TestClasses.cs
================================================
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MongoDbGenericRepository.Models;
using MongoDbGenericRepository.Utils;
using System;
using System.Collections.Generic;
namespace CoreIntegrationTests.Infrastructure
{
public class ProjectedGroup
{
public int Key { get; set; }
public List<string> Content { get; set; }
}
public class MyTestProjection
{
public string SomeContent { get; set; }
public DateTime SomeDate { get; set; }
}
public class Nested
{
public DateTime SomeDate { get; set; }
[BsonRepresentation(BsonType.Decimal128)]
public decimal SomeAmount { get; set; }
}
public class Child
{
public Child(string type, string value)
{
Type = type;
Value = value;
}
public string Type { get; set; }
public string Value { get; set; }
}
public class TestDoc : Document
{
public TestDoc()
{
Version = 2;
Nested = new Nested
{
SomeDate = DateTime.UtcNow
};
Children = new List<Child>();
}
public int SomeValue { get; set; }
public string SomeContent { get; set; }
public string SomeContent2 { get; set; }
public string SomeContent3 { get; set; }
public int GroupingKey { get; set; }
public Nested Nested { get; set; }
public List<Child> Children { get; set; }
}
public class TestDoc<TKey> : IDocument<TKey>
where TKey : IEquatable<TKey>
{
[BsonId]
public TKey Id { get; set; }
public int Version { get; set; }
public TestDoc()
{
InitializeFields();
Version = 2;
Nested = new Nested
{
SomeDate = DateTime.UtcNow
};
Children = new List<Child>();
}
public int GroupingKey { get; set; }
public string SomeContent { get; set; }
public string SomeContent4 { get; set; }
public string SomeContent5 { get; set; }
public Nested Nested { get; set; }
public List<Child> Children { get; set; }
public TId Init<TId>()
{
return IdGenerator.GetId<TId>();
}
private void InitializeFields()
{
Id = Init<TKey>();
}
}
}
================================================
FILE: CoreIntegrationTests/Infrastructure/TestRepository.cs
================================================
using MongoDB.Bson;
using MongoDbGenericRepository;
using System;
namespace CoreIntegrationTests.Infrastructure
{
public interface ITestRepository<TKey> : IBaseMongoRepository<TKey> where TKey : IEquatable<TKey>
{
void DropTestCollection<TDocument>();
void DropTestCollection<TDocument>(string partitionKey);
}
public class TestTKeyRepository<TKey> : BaseMongoRepository<TKey>, ITestRepository<TKey> where TKey : IEquatable<TKey>
{
const string connectionString = "mongodb://localhost:27017/MongoDbTests";
private static readonly ITestRepository<TKey> _instance = new TestTKeyRepository<TKey>(connectionString);
/// <inheritdoc />
private TestTKeyRepository(string connectionString) : base(connectionString)
{
}
public static ITestRepository<TKey> Instance
{
get
{
return _instance;
}
}
public void DropTestCollection<TDocument>()
{
MongoDbContext.DropCollection<TDocument>();
}
public void DropTestCollection<TDocument>(string partitionKey)
{
MongoDbContext.DropCollection<TDocument>(partitionKey);
}
}
/// <summary>
/// A singleton implementation of the TestRepository
/// </summary>
public sealed class TestRepository : BaseMongoRepository, ITestRepository
{
const string connectionString = "mongodb://localhost:27017";
private static readonly ITestRepository _instance = new TestRepository(connectionString, "MongoDbTests");
// Explicit static constructor to tell C# compiler
// not to mark type as beforefieldinit
static TestRepository()
{
}
/// <inheritdoc />
private TestRepository(string connectionString, string databaseName) : base(connectionString, databaseName)
{
}
public static ITestRepository Instance
{
get
{
return _instance;
}
}
public void DropTestCollection<TDocument>()
{
MongoDbContext.DropCollection<TDocument>();
}
public void DropTestCollection<TDocument>(string partitionKey)
{
MongoDbContext.DropCollection<TDocument>(partitionKey);
}
}
}
================================================
FILE: CoreUnitTests/.editorconfig
================================================
# All Files
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
#########################################
# File Extension Settings
##########################################
# .NET Style Rules
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#net-style-rules
[*.cs]
# "this." and "Me." qualifiers
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning
# Language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
# Modifier preferences
dotnet_style_require_accessibility_modifiers = always:warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:warning
dotnet_style_readonly_field = true:warning
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
# Expression-level preferences
dotnet_style_object_initializer = true:warning
dotnet_style_collection_initializer = true:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_prefer_inferred_tuple_names = true:warning
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion
dotnet_diagnostic.IDE0045.severity = suggestion
dotnet_style_prefer_conditional_expression_over_return = false:suggestion
dotnet_diagnostic.IDE0046.severity = suggestion
dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_simplified_interpolation = true:warning
dotnet_style_prefer_simplified_boolean_expressions = true:warning
# Null-checking preferences
dotnet_style_coalesce_expression = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
# File header preferences
# file_header_template = <copyright file="{fileName}" company="PROJECT-AUTHOR">\n© PROJECT-AUTHOR\n</copyright>
# If you use StyleCop, you'll need to disable SA1636: File header copyright text should match.
# dotnet_diagnostic.SA1636.severity = none
# Undocumented
dotnet_style_operator_placement_when_wrapping = end_of_line:warning
csharp_style_prefer_null_check_over_type_check = true:warning
dotnet_analyzer_diagnostic.severity = warning
dotnet_code_quality_unused_parameters = all:warning
dotnet_remove_unnecessary_suppression_exclusions = none:warning
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
dotnet_style_namespace_match_folder = true:suggestion
dotnet_diagnostic.IDE0130.severity = suggestion
dotnet_naming_style.camel_case_style.capitalization = camel_case
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
dotnet_naming_style.first_upper_style.capitalization = first_word_upper
dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case
dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I
dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_case
dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T
dotnet_naming_style.disallowed_style.capitalization = pascal_case
dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
dotnet_naming_style.internal_error_style.capitalization = pascal_case
dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____
dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR____
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group
dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.severity = warning
dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.public_protected_static_readonly_fields_group.required_modifiers = static, readonly
dotnet_naming_symbols.public_protected_static_readonly_fields_group.applicable_kinds = field
dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.symbols = public_protected_static_readonly_fields_group
dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.public_protected_static_readonly_fields_must_be_pascal_case_rule.severity = warning
dotnet_naming_symbols.other_public_protected_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.other_public_protected_fields_group.applicable_kinds = field
dotnet_naming_rule.other_public_protected_fields_disallowed_rule.symbols = other_public_protected_fields_group
dotnet_naming_rule.other_public_protected_fields_disallowed_rule.style = disallowed_style
dotnet_naming_rule.other_public_protected_fields_disallowed_rule.severity = error
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.stylecop_constant_fields_group.required_modifiers = const
dotnet_naming_symbols.stylecop_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.symbols = stylecop_constant_fields_group
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.stylecop_constant_fields_must_be_pascal_case_rule.severity = warning
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.stylecop_static_readonly_fields_group.required_modifiers = static, readonly
dotnet_naming_symbols.stylecop_static_readonly_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.symbols = stylecop_static_readonly_fields_group
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.stylecop_static_readonly_fields_must_be_pascal_case_rule.severity = warning
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected
dotnet_naming_symbols.stylecop_fields_must_be_private_group.applicable_kinds = field
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.symbols = stylecop_fields_must_be_private_group
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.style = disallowed_style
dotnet_naming_rule.stylecop_instance_fields_must_be_private_rule.severity = error
dotnet_naming_symbols.stylecop_private_fields_group.applicable_accessibilities = private
dotnet_naming_symbols.stylecop_private_fields_group.applicable_kinds = field
dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.symbols = stylecop_private_fields_group
dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.style = camel_case_style
dotnet_naming_rule.stylecop_private_fields_must_be_camel_case_rule.severity = warning
dotnet_naming_symbols.stylecop_local_fields_group.applicable_accessibilities = local
dotnet_naming_symbols.stylecop_local_fields_group.applicable_kinds = local
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.symbols = stylecop_local_fields_group
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.style = camel_case_style
dotnet_naming_rule.stylecop_local_fields_must_be_camel_case_rule.severity = silent
dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_accessibilities = *
dotnet_naming_symbols.sanity_check_uncovered_field_case_group.applicable_kinds = field
dotnet_naming_rule.sanity_check_uncovered_field_case_rule.symbols = sanity_check_uncovered_field_case_group
dotnet_naming_rule.sanity_check_uncovered_field_case_rule.style = internal_error_style
dotnet_naming_rule.sanity_check_uncovered_field_case_rule.severity = error
dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property
dotnet_naming_rule.element_rule.symbols = element_group
dotnet_naming_rule.element_rule.style = pascal_case_style
dotnet_naming_rule.element_rule.severity = warning
dotnet_naming_symbols.interface_group.applicable_kinds = interface
dotnet_naming_rule.interface_rule.symbols = interface_group
dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style
dotnet_naming_rule.interface_rule.severity = warning
dotnet_naming_symbols.type_parameter_group.applicable_kinds = type_parameter
dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_group
dotnet_naming_rule.type_parameter_rule.style = prefix_type_parameters_with_t_style
dotnet_naming_rule.type_parameter_rule.severity = warning
dotnet_naming_symbols.parameters_group.applicable_kinds = parameter
dotnet_naming_rule.parameters_rule.symbols = parameters_group
dotnet_naming_rule.parameters_rule.style = camel_case_style
dotnet_naming_rule.parameters_rule.severity = warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:warning
csharp_style_expression_bodied_methods = true:warning
csharp_style_expression_bodied_constructors = true:warning
csharp_style_expression_bodied_operators = true:warning
csharp_style_expression_bodied_properties = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_accessors = true:warning
csharp_style_expression_bodied_lambdas = true:warning
csharp_style_expression_bodied_local_functions = true:warning
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_prefer_switch_expression = true:warning
csharp_style_prefer_pattern_matching = true:warning
csharp_style_prefer_not_pattern = true:warning
csharp_style_inlined_variable_declaration = true:warning
csharp_prefer_simple_default_expression = true:warning
csharp_style_pattern_local_over_anonymous_function = true:warning
csharp_style_deconstructed_variable_declaration = true:warning
csharp_style_prefer_index_operator = true:warning
csharp_style_prefer_range_operator = true:warning
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
csharp_style_throw_expression = true:warning
csharp_style_conditional_delegate_call = true:warning
csharp_prefer_braces = true:warning
csharp_prefer_simple_using_statement = true:suggestion
dotnet_diagnostic.IDE0063.severity = suggestion
csharp_using_directive_placement = outside_namespace
csharp_prefer_static_local_function = true:warning
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
dotnet_diagnostic.IDE0058.severity = suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
dotnet_diagnostic.IDE0059.severity = suggestion
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = no_change
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents_when_block = false
csharp_space_after_cast = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_parentheses = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_after_comma = true
csharp_space_before_comma = false
csharp_space_after_dot = false
csharp_space_before_dot = false
csharp_space_after_semicolon_in_for_statement = true
csharp_space_before_semicolon_in_for_statement = false
csharp_space_around_declaration_statements = false
csharp_space_before_open_square_brackets = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_square_brackets = false
csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true
csharp_style_namespace_declarations = file_scoped:warning
dotnet_diagnostic.CA1707.severity = none
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddManyAsyncTests.cs
================================================
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using MongoDbGenericRepository.DataAccess.Create;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.AddTests;
public class AddManyAsyncTests : TestMongoRepositoryContext
{
[Fact]
public async Task WithDocument_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddManyAsync(documents);
// Assert
Creator.Verify(x => x.AddManyAsync<TestDocument, Guid>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddManyAsync(documents, token);
// Assert
Creator.Verify(x => x.AddManyAsync<TestDocument, Guid>(documents, token), Times.Once);
}
#region Keyed
[Fact]
public async Task Keyed_WithDocument_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddManyAsync<TestDocumentWithKey<int>, int>(documents);
// Assert
Creator.Verify(x => x.AddManyAsync<TestDocumentWithKey<int>, int>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public async Task Keyed_WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddManyAsync<TestDocumentWithKey<int>, int>(documents, token);
// Assert
Creator.Verify(x => x.AddManyAsync<TestDocumentWithKey<int>, int>(documents, token), Times.Once);
}
#endregion
}
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddManyTests.cs
================================================
using System;
using System.Linq;
using System.Threading;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using MongoDbGenericRepository.DataAccess.Create;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.AddTests;
public class AddManyTests : TestMongoRepositoryContext
{
[Fact]
public void WithDocument_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddMany(documents);
// Assert
Creator.Verify(x => x.AddMany<TestDocument, Guid>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public void WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddMany(documents, token);
// Assert
Creator.Verify(x => x.AddMany<TestDocument, Guid>(documents, token), Times.Once);
}
#region Keyed
[Fact]
public void Keyed_WithDocument_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddMany<TestDocumentWithKey<int>, int>(documents);
// Assert
Creator.Verify(x => x.AddMany<TestDocumentWithKey<int>, int>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public void Keyed_WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddMany<TestDocumentWithKey<int>, int>(documents, token);
// Assert
Creator.Verify(x => x.AddMany<TestDocumentWithKey<int>, int>(documents, token), Times.Once);
}
#endregion
}
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddOneAsyncTests.cs
================================================
using System;
using System.Threading;
using System.Threading.Tasks;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using MongoDbGenericRepository.DataAccess.Create;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.AddTests;
public class AddOneAsyncTests : TestMongoRepositoryContext
{
[Fact]
public async Task WithDocument_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocument>();
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddOneAsync(document);
// Assert
Creator.Verify(x => x.AddOneAsync<TestDocument, Guid>(document, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocument>();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddOneAsync(document, token);
// Assert
Creator.Verify(x => x.AddOneAsync<TestDocument, Guid>(document, token), Times.Once);
}
#region Keyed
[Fact]
public async Task Keyed_WithDocument_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocumentWithKey<int>>();
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddOneAsync<TestDocumentWithKey<int>, int>(document);
// Assert
Creator.Verify(x => x.AddOneAsync<TestDocumentWithKey<int>, int>(document, CancellationToken.None), Times.Once);
}
[Fact]
public async Task Keyed_WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocumentWithKey<int>>();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
await Sut.AddOneAsync<TestDocumentWithKey<int>, int>(document, token);
// Assert
Creator.Verify(x => x.AddOneAsync<TestDocumentWithKey<int>, int>(document, token), Times.Once);
}
#endregion
}
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddOneTests.cs
================================================
using System;
using System.Threading;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using MongoDbGenericRepository.DataAccess.Create;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.AddTests;
public class AddOneTests : TestMongoRepositoryContext
{
[Fact]
public void WithDocument_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocument>();
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddOne(document);
// Assert
Creator.Verify(x => x.AddOne<TestDocument, Guid>(document, CancellationToken.None), Times.Once);
}
[Fact]
public void WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocument>();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddOne(document, token);
// Assert
Creator.Verify(x => x.AddOne<TestDocument, Guid>(document, token), Times.Once);
}
#region Keyed
[Fact]
public void Keyed_WithDocument_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocumentWithKey<int>>();
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddOne<TestDocumentWithKey<int>, int>(document);
// Assert
Creator.Verify(x => x.AddOne<TestDocumentWithKey<int>, int>(document, CancellationToken.None), Times.Once);
}
[Fact]
public void Keyed_WithDocumentAndCancellationToken_ShouldAddOne()
{
// Arrange
var document = Fixture.Create<TestDocumentWithKey<int>>();
var token = new CancellationToken(true);
Creator = new Mock<IMongoDbCreator>();
// Act
Sut.AddOne<TestDocumentWithKey<int>, int>(document, token);
// Assert
Creator.Verify(x => x.AddOne<TestDocumentWithKey<int>, int>(document, token), Times.Once);
}
#endregion
}
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteManyAsyncTests.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using FluentAssertions;
using MongoDbGenericRepository.DataAccess.Delete;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.DeleteTests;
public class DeleteManyAsyncTests : TestMongoRepositoryContext
{
[Fact]
public async Task WithDocuments_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
var count = Fixture.Create<long>();
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocument, Guid>(It.IsAny<IEnumerable<TestDocument>>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync(documents);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocument, Guid>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithDocumentsAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
var count = Fixture.Create<long>();
var cancellationToken = new CancellationToken(true);
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocument, Guid>(It.IsAny<IEnumerable<TestDocument>>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync(documents, cancellationToken);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocument, Guid>(documents, cancellationToken), Times.Once);
}
[Fact]
public async Task WithFilter_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocument, Guid>(
It.IsAny<Expression<Func<TestDocument, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync(filter);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocument, Guid>(filter, null, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithFilterAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocument, Guid>(
It.IsAny<Expression<Func<TestDocument, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync(filter, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocument, Guid>(filter, null, token), Times.Once);
}
[Fact]
public async Task WithFilterAndPartitionKey_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocument, Guid>(
It.IsAny<Expression<Func<TestDocument, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync(filter, partitionKey);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocument, Guid>(filter, partitionKey, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
var token = new CancellationToken(true);
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocument, Guid>(
It.IsAny<Expression<Func<TestDocument, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync(filter, partitionKey, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocument, Guid>(filter, partitionKey, token), Times.Once);
}
#region Keyed
[Fact]
public async Task Keyed_WithDocuments_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
var count = Fixture.Create<long>();
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(It.IsAny<IEnumerable<TestDocumentWithKey<int>>>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync<TestDocumentWithKey<int>, int>(documents);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public async Task Keyed_WithDocumentsAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
var count = Fixture.Create<long>();
var cancellationToken = new CancellationToken(true);
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(It.IsAny<IEnumerable<TestDocumentWithKey<int>>>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync<TestDocumentWithKey<int>, int>(documents, cancellationToken);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(documents, cancellationToken), Times.Once);
}
[Fact]
public async Task Keyed_WithFilter_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(
It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, null, CancellationToken.None), Times.Once);
}
[Fact]
public async Task Keyed_WithFilterAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(
It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, null, token), Times.Once);
}
[Fact]
public async Task Keyed_WithFilterAndPartitionKey_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(
It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, partitionKey);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, partitionKey, CancellationToken.None), Times.Once);
}
[Fact]
public async Task Keyed_WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
var token = new CancellationToken(true);
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(
It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(),
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, partitionKey, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteManyAsync<TestDocumentWithKey<int>, int>(filter, partitionKey, token), Times.Once);
}
#endregion
}
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteManyTests.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using FluentAssertions;
using MongoDbGenericRepository.DataAccess.Delete;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.DeleteTests;
public class DeleteManyTests : TestMongoRepositoryContext
{
[Fact]
public void WithDocuments_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
var count = Fixture.Create<long>();
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocument, Guid>(It.IsAny<IEnumerable<TestDocument>>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany(documents);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocument, Guid>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public void WithDocumentsAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocument>().ToList();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocument, Guid>(It.IsAny<IEnumerable<TestDocument>>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany(documents, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocument, Guid>(documents, token), Times.Once);
}
[Fact]
public void WithFilter_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany(filter);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocument, Guid>(filter, null, CancellationToken.None), Times.Once);
}
[Fact]
public void WithFilterAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany(filter, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocument, Guid>(filter, null, token), Times.Once);
}
[Fact]
public void WithFilterAndPartitionKey_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany(filter, partitionKey);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocument, Guid>(filter, partitionKey, CancellationToken.None), Times.Once);
}
[Fact]
public void WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
var token = new CancellationToken(true);
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany(filter, partitionKey, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocument, Guid>(filter, partitionKey, token), Times.Once);
}
#region Keyed
[Fact]
public void Keyed_WithDocuments_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
var count = Fixture.Create<long>();
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocumentWithKey<int>, int>(It.IsAny<IEnumerable<TestDocumentWithKey<int>>>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany<TestDocumentWithKey<int>, int>(documents);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocumentWithKey<int>, int>(documents, CancellationToken.None), Times.Once);
}
[Fact]
public void Keyed_WithDocumentsAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var documents = Fixture.CreateMany<TestDocumentWithKey<int>>().ToList();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocumentWithKey<int>, int>(It.IsAny<IEnumerable<TestDocumentWithKey<int>>>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany<TestDocumentWithKey<int>, int>(documents, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocumentWithKey<int>, int>(documents, token), Times.Once);
}
[Fact]
public void Keyed_WithFilter_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocumentWithKey<int>, int>(It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(), null, CancellationToken.None))
.Returns(count);
// Act
var result = Sut.DeleteMany<TestDocumentWithKey<int>, int>(filter);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocumentWithKey<int>, int>(filter, null, CancellationToken.None), Times.Once);
}
[Fact]
public void Keyed_WithFilterAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocumentWithKey<int>, int>(It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany<TestDocumentWithKey<int>, int>(filter, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocumentWithKey<int>, int>(filter, null, token), Times.Once);
}
[Fact]
public void Keyed_WithFilterAndPartitionKey_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocumentWithKey<int>, int>(It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany<TestDocumentWithKey<int>, int>(filter, partitionKey);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocumentWithKey<int>, int>(filter, partitionKey, CancellationToken.None), Times.Once);
}
[Fact]
public void Keyed_WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany()
{
// Arrange
var content = Fixture.Create<string>();
var count = Fixture.Create<long>();
var partitionKey = Fixture.Create<string>();
var token = new CancellationToken(true);
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteMany<TestDocumentWithKey<int>, int>(It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Returns(count);
// Act
var result = Sut.DeleteMany<TestDocumentWithKey<int>, int>(filter, partitionKey, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteMany<TestDocumentWithKey<int>, int>(filter, partitionKey, token), Times.Once);
}
#endregion
}
================================================
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteOneAsyncTests.cs
================================================
using System;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using AutoFixture;
using CoreUnitTests.Infrastructure;
using CoreUnitTests.Infrastructure.Model;
using FluentAssertions;
using MongoDbGenericRepository.DataAccess.Delete;
using Moq;
using Xunit;
namespace CoreUnitTests.BaseMongoRepositoryTests.DeleteTests;
public class DeleteOneAsyncTests : TestMongoRepositoryContext
{
[Fact]
public async Task WithDocument_ShouldDeleteOne()
{
// Arrange
var document = Fixture.Create<TestDocument>();
var count = Fixture.Create<long>();
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocument, Guid>(It.IsAny<TestDocument>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync(document);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocument, Guid>(document, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithDocumentAndCancellationToken_ShouldDeleteOne()
{
// Arrange
var document = Fixture.Create<TestDocument>();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocument, Guid>(It.IsAny<TestDocument>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync(document, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocument, Guid>(document, token), Times.Once);
}
[Fact]
public async Task WithFilter_ShouldDeleteOne()
{
// Arrange
var count = Fixture.Create<long>();
var content = Fixture.Create<string>();
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync(filter);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocument, Guid>(filter, null, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithFilterAndCancellationToken_ShouldDeleteOne()
{
// Arrange
var count = Fixture.Create<long>();
var content = Fixture.Create<string>();
var token = new CancellationToken(true);
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync(filter, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocument, Guid>(filter, null, token), Times.Once);
}
[Fact]
public async Task WithFilterAndPartitionKey_ShouldDeleteOne()
{
// Arrange
var count = Fixture.Create<long>();
var content = Fixture.Create<string>();
var partitionKey = Fixture.Create<string>();
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync(filter, partitionKey);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocument, Guid>(filter, partitionKey, CancellationToken.None), Times.Once);
}
[Fact]
public async Task WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne()
{
// Arrange
var count = Fixture.Create<long>();
var content = Fixture.Create<string>();
var partitionKey = Fixture.Create<string>();
var token = new CancellationToken(true);
Expression<Func<TestDocument, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocument, Guid>(It.IsAny<Expression<Func<TestDocument, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync(filter, partitionKey, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocument, Guid>(filter, partitionKey, token), Times.Once);
}
#region Keyed
[Fact]
public async Task Keyed_WithDocument_ShouldDeleteOne()
{
// Arrange
var document = Fixture.Create<TestDocumentWithKey<int>>();
var count = Fixture.Create<long>();
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocumentWithKey<int>, int>(It.IsAny<TestDocumentWithKey<int>>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync<TestDocumentWithKey<int>, int>(document);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocumentWithKey<int>, int>(document, CancellationToken.None), Times.Once);
}
[Fact]
public async Task Keyed_WithDocumentAndCancellationToken_ShouldDeleteOne()
{
// Arrange
var document = Fixture.Create<TestDocumentWithKey<int>>();
var count = Fixture.Create<long>();
var token = new CancellationToken(true);
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocumentWithKey<int>, int>(It.IsAny<TestDocumentWithKey<int>>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(count);
// Act
var result = await Sut.DeleteOneAsync<TestDocumentWithKey<int>, int>(document, token);
// Assert
result.Should().Be(count);
Eraser.Verify(x => x.DeleteOneAsync<TestDocumentWithKey<int>, int>(document, token), Times.Once);
}
[Fact]
public async Task Keyed_WithFilter_ShouldDeleteOne()
{
// Arrange
var count = Fixture.Create<long>();
var content = Fixture.Create<string>();
Expression<Func<TestDocumentWithKey<int>, bool>> filter = x => x.SomeContent == content;
Eraser = new Mock<IMongoDbEraser>();
Eraser
.Setup(x => x.DeleteOneAsync<TestDocumentWithKey<int>, int>(It.IsAny<Expression<Func<TestDocumentWithKey<int>, bool>>>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.ReturnsA
gitextract_61u1jiz3/ ├── .gitignore ├── CoreIntegrationTests/ │ ├── App.config │ ├── CRUDObjectIdTests.cs │ ├── CRUDPartitionedCollectionNameAttributeTests.cs │ ├── CRUDPartitionedTests.cs │ ├── CRUDTKeyPartitionedCollectionNameAttributeTests.cs │ ├── CRUDTKeyPartitionedTests.cs │ ├── CRUDTKeyTests.cs │ ├── CRUDTests.cs │ ├── CoreIntegrationTests.csproj │ ├── IdentityUserTests.cs │ └── Infrastructure/ │ ├── BaseMongoDbRepositoryTests.cs │ ├── GlobalVariables.cs │ ├── ITestRepository.cs │ ├── MongoDbConfig.cs │ ├── MongoDbDocumentTestBase.Main.cs │ ├── MongoDbDocumentTestBase.Update.cs │ ├── MongoDbTKeyDocumentTestBase.Main.cs │ ├── MongoDbTKeyDocumentTestBase.Update.cs │ ├── MongoDbTestFixture.cs │ ├── RandomExtensions.cs │ ├── TestClasses.cs │ └── TestRepository.cs ├── CoreUnitTests/ │ ├── .editorconfig │ ├── BaseMongoRepositoryTests/ │ │ ├── AddTests/ │ │ │ ├── AddManyAsyncTests.cs │ │ │ ├── AddManyTests.cs │ │ │ ├── AddOneAsyncTests.cs │ │ │ └── AddOneTests.cs │ │ ├── DeleteTests/ │ │ │ ├── DeleteManyAsyncTests.cs │ │ │ ├── DeleteManyTests.cs │ │ │ ├── DeleteOneAsyncTests.cs │ │ │ └── DeleteOneTests.cs │ │ ├── IndexTests/ │ │ │ ├── BaseIndexTests.cs │ │ │ ├── CreateAscendingIndexAsyncTests.cs │ │ │ ├── CreateCombinedTextIndexAsyncTests.cs │ │ │ ├── CreateDescendingIndexAsyncTests.cs │ │ │ ├── CreateHashedIndexAsyncTests.cs │ │ │ ├── CreateTextIndexAsyncTests.cs │ │ │ ├── DropIndexAsyncTests.cs │ │ │ └── GetIndexNamesAsyncTests.cs │ │ └── UpdateTests/ │ │ ├── UpdateManyAsyncTests.cs │ │ ├── UpdateManyTests.cs │ │ ├── UpdateOneAsyncTests.cs │ │ └── UpdateOneTests.cs │ ├── CoreUnitTests.csproj │ ├── DataAccessTests/ │ │ ├── MongoDbCreatorTests/ │ │ │ ├── AddManyAsyncTests.cs │ │ │ ├── AddManyTests.cs │ │ │ ├── AddOneAsyncTests.cs │ │ │ └── AddOneTests.cs │ │ ├── MongoDbEraserTests/ │ │ │ ├── DeleteManyAsyncTests.cs │ │ │ ├── DeleteManyTests.cs │ │ │ ├── DeleteOneAsyncTests.cs │ │ │ └── DeleteOneTests.cs │ │ ├── MongoDbIndexHandlerTests/ │ │ │ ├── BaseIndexTests.cs │ │ │ ├── CreateAscendingIndexAsyncTests.cs │ │ │ ├── CreateCombinedTextIndexAsyncTests.cs │ │ │ ├── CreateDescendingIndexAsyncTests.cs │ │ │ ├── CreateHashedIndexAsyncTests.cs │ │ │ ├── CreateTextIndexAsyncTests.cs │ │ │ ├── DropIndexAsyncTests.cs │ │ │ └── GetIndexNamesAsyncTests.cs │ │ ├── MongoDbReaderTests/ │ │ │ ├── AnyAsyncTests.cs │ │ │ ├── AnyTests.cs │ │ │ ├── BaseReaderTests.cs │ │ │ ├── CountAsyncTests.cs │ │ │ ├── CountTests.cs │ │ │ ├── GetAllAsyncTests.cs │ │ │ ├── GetAllTests.cs │ │ │ ├── GetByIdAsyncTests.cs │ │ │ ├── GetByIdTests.cs │ │ │ ├── GetByMaxAsyncTests.cs │ │ │ ├── GetByMaxTests.cs │ │ │ ├── GetByMinAsyncTests.cs │ │ │ ├── GetByMinTests.cs │ │ │ ├── GetMaxValueAsyncTests .cs │ │ │ ├── GetMaxValueTests .cs │ │ │ ├── GetMinValueAsyncTests .cs │ │ │ ├── GetMinValueTests .cs │ │ │ ├── GetOneAsyncTests.cs │ │ │ ├── GetOneTests.cs │ │ │ ├── ProjectManyAsyncTests.cs │ │ │ ├── ProjectManyTests.cs │ │ │ ├── ProjectOneAsyncTests.cs │ │ │ └── ProjectOneTests.cs │ │ └── MongoDbUpdaterTests/ │ │ ├── UpdateManyAsyncTests.cs │ │ ├── UpdateManyTests.cs │ │ ├── UpdateOneAsyncTests.cs │ │ └── UpdateOneTests.cs │ ├── Infrastructure/ │ │ ├── FilterDefinitionExtensions.cs │ │ ├── GenericTestContext.cs │ │ ├── IndexExtensions.cs │ │ ├── Model/ │ │ │ ├── Child.cs │ │ │ ├── Nested.cs │ │ │ ├── PartitionedTestDocument.cs │ │ │ ├── TestDocument.cs │ │ │ ├── TestDocumentWithKey.cs │ │ │ └── TestProjection.cs │ │ ├── TestKeyedMongoRepository.cs │ │ ├── TestKeyedMongoRepositoryContext.cs │ │ ├── TestKeyedReadOnlyMongoRepository.cs │ │ ├── TestKeyedReadOnlyMongoRepositoryContext.cs │ │ ├── TestMongoRepository.cs │ │ ├── TestMongoRepositoryContext.cs │ │ ├── TestReadOnlyMongoRepository.cs │ │ ├── TestReadOnlyMongoRepositoryContext.cs │ │ └── UpdateDefinitionExtensions.cs │ ├── KeyTypedRepositoryTests/ │ │ ├── AddTests/ │ │ │ ├── AddManyAsyncTests.cs │ │ │ ├── AddManyTests.cs │ │ │ ├── AddOneAsyncTests.cs │ │ │ └── AddOneTests.cs │ │ ├── DeleteTests/ │ │ │ ├── DeleteManyAsyncTests.cs │ │ │ ├── DeleteManyTests.cs │ │ │ ├── DeleteOneAsyncTests.cs │ │ │ └── DeleteOneTests.cs │ │ ├── IndexTests/ │ │ │ ├── CreateAscendingIndexAsyncTests.cs │ │ │ ├── CreateCombinedTextIndexAsyncTests.cs │ │ │ ├── CreateDescendingIndexAsyncTests.cs │ │ │ ├── CreateHashedIndexAsyncTests.cs │ │ │ ├── CreateTextIndexAsyncTests.cs │ │ │ ├── DropIndexAsyncTests.cs │ │ │ └── GetIndexNamesAsyncTests.cs │ │ └── UpdateTests/ │ │ ├── UpdateManyAsyncTests.cs │ │ ├── UpdateManyTests.cs │ │ ├── UpdateOneAsyncTests.cs │ │ └── UpdateOneTests.cs │ ├── KeyedReadOnlyMongoRepositoryTests/ │ │ ├── AnyAsyncTests.cs │ │ ├── AnyTests.cs │ │ ├── CountAsyncTests.cs │ │ ├── CountTests.cs │ │ ├── GetAllAsyncTests.cs │ │ ├── GetAllTests.cs │ │ ├── GetByIdAsyncTests.cs │ │ ├── GetByIdTests.cs │ │ ├── GetByMaxAsyncTests.cs │ │ ├── GetByMaxTests.cs │ │ ├── GetByMinAsyncTests.cs │ │ ├── GetByMinTests.cs │ │ ├── GetMaxValueAsyncTests.cs │ │ ├── GetMaxValueTests.cs │ │ ├── GetMinValueAsyncTests.cs │ │ ├── GetMinValueTests.cs │ │ ├── GetOneAsyncTests.cs │ │ ├── GetOneTests.cs │ │ ├── GetSortedPaginatedAsyncTests.cs │ │ ├── GroupByTests.cs │ │ ├── ProjectManyAsyncTests.cs │ │ ├── ProjectManyTests.cs │ │ ├── ProjectOneAsyncTests.cs │ │ ├── ProjectOneTests.cs │ │ └── SumByAsyncTests.cs │ └── ReadOnlyMongoRepositoryTests/ │ ├── AnyAsyncTests.cs │ ├── AnyTests.cs │ ├── CountAsyncTests.cs │ ├── CountTests.cs │ ├── GetAllAsyncTests.cs │ ├── GetAllTests.cs │ ├── GetByIdAsyncTests.cs │ ├── GetByIdTests.cs │ ├── GetByMaxAsyncTests.cs │ ├── GetByMaxTests.cs │ ├── GetByMinAsyncTests.cs │ ├── GetByMinTests.cs │ ├── GetMaxValueAsyncTests.cs │ ├── GetMaxValueTests.cs │ ├── GetMinValueAsyncTests.cs │ ├── GetMinValueTests.cs │ ├── GetOneAsyncTests.cs │ ├── GetOneTests.cs │ ├── GetSortedPaginatedAsyncTests.cs │ ├── GroupByTests.cs │ ├── ProjectManyAsyncTests.cs │ ├── ProjectManyTests.cs │ ├── ProjectOneAsyncTests.cs │ ├── ProjectOneTests.cs │ └── SumByAsyncTests.cs ├── IntegrationTests/ │ ├── App.config │ ├── CRUDObjectIdTests.cs │ ├── CRUDPartitionedCollectionNameAttributeTests.cs │ ├── CRUDPartitionedTests.cs │ ├── CRUDTKeyPartitionedCollectionNameAttributeTests.cs │ ├── CRUDTKeyPartitionedTests.cs │ ├── CRUDTKeyTests.cs │ ├── CRUDTests.cs │ ├── Infrastructure/ │ │ ├── BaseMongoDbRepositoryTests.cs │ │ ├── GlobalVariables.cs │ │ ├── ITestRepository.cs │ │ ├── MongoDBDocumentTestBase.cs │ │ ├── MongoDbTKeyDocumentTestBase.cs │ │ ├── RandomExtensions.cs │ │ ├── TestClasses.cs │ │ └── TestRepository.cs │ ├── IntegrationTests.csproj │ ├── Properties/ │ │ └── AssemblyInfo.cs │ └── packages.config ├── LICENSE ├── MongoDbGenericRepository/ │ ├── Abstractions/ │ │ ├── IBaseMongoRepository.cs │ │ ├── IBaseMongoRepository_Update.cs │ │ ├── IBaseMongoRepository_Update_ClientSession.cs │ │ ├── IBaseReadOnlyRepository.cs │ │ ├── IMongoDbContext.cs │ │ ├── IReadOnlyMongoRepository.TKey.cs │ │ └── IReadOnlyMongoRepository.cs │ ├── Attributes/ │ │ └── CollectionNameAttribute.cs │ ├── BaseMongoRepository.Create.cs │ ├── BaseMongoRepository.Delete.cs │ ├── BaseMongoRepository.Index.cs │ ├── BaseMongoRepository.Main.cs │ ├── BaseMongoRepository.Update.ClientSession.cs │ ├── BaseMongoRepository.Update.cs │ ├── DataAccess/ │ │ ├── Base/ │ │ │ ├── DataAccessBase.cs │ │ │ └── IDataAccessBase.cs │ │ ├── Create/ │ │ │ ├── IMongoDbCreator.cs │ │ │ └── MongoDbCreator.cs │ │ ├── Delete/ │ │ │ ├── IMongoDbEraser.cs │ │ │ └── MongoDbEraser.cs │ │ ├── Index/ │ │ │ ├── IMongoDbIndexHandler.cs │ │ │ └── MongoDbIndexHandler.cs │ │ ├── Read/ │ │ │ ├── IMongoDbReader.cs │ │ │ ├── MongoDbReader.GroupBy.cs │ │ │ ├── MongoDbReader.Main.cs │ │ │ └── MongoDbReader.Project.cs │ │ └── Update/ │ │ ├── IMongoDbUpdater.cs │ │ ├── MongoDbUpdater.ClientSession.cs │ │ └── MongoDbUpdater.cs │ ├── IBaseMongoRepository.Create.cs │ ├── IBaseMongoRepository.Delete.cs │ ├── IBaseMongoRepository.Index.cs │ ├── Internals/ │ │ └── RepositorySerializationProvider.cs │ ├── KeyTypedRepository/ │ │ ├── BaseMongoRepository.TKey.Create.cs │ │ ├── BaseMongoRepository.TKey.Delete.cs │ │ ├── BaseMongoRepository.TKey.Index.cs │ │ ├── BaseMongoRepository.TKey.Main.cs │ │ ├── BaseMongoRepository.TKey.ReadOnly.cs │ │ ├── BaseMongoRepository.TKey.Update.cs │ │ ├── IBaseMongoRepository.TKey.Create.cs │ │ ├── IBaseMongoRepository.TKey.Delete.cs │ │ ├── IBaseMongoRepository.TKey.Index.cs │ │ ├── IBaseMongoRepository.TKey.Update.cs │ │ └── IBaseMongoRepository.TKey.cs │ ├── Models/ │ │ ├── Document.cs │ │ ├── IDocument.cs │ │ ├── IPartitionedDocument.cs │ │ ├── IndexCreationOptions.cs │ │ └── PartitionedDocument.cs │ ├── MongoDbContext.cs │ ├── MongoDbGenericRepository.csproj │ ├── MongoDbGenericRepository.xml │ ├── ReadOnlyMongoRepository.cs │ ├── Utils/ │ │ ├── IdGenerator.cs │ │ ├── Pluralization.cs │ │ └── RandomExtensions.cs │ └── _rels/ │ └── .rels ├── MongoDbGenericRepository.sln └── README.md
Showing preview only (345K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3503 symbols across 239 files)
FILE: CoreIntegrationTests/CRUDObjectIdTests.cs
class CoreObjectIdTestDocument (line 6) | public class CoreObjectIdTestDocument : TestDoc<ObjectId>
class CRUDObjectIdTests (line 10) | public class CRUDObjectIdTests : MongoDbTKeyDocumentTestBase<CoreObjectI...
method CRUDObjectIdTests (line 12) | public CRUDObjectIdTests(MongoDbTestFixture<CoreObjectIdTestDocument, ...
method GetClassName (line 17) | public override string GetClassName()
FILE: CoreIntegrationTests/CRUDPartitionedCollectionNameAttributeTests.cs
class CorePartitionedCollectionNameDoc (line 8) | [CollectionName("CoreTestingCNameAttrPart")]
method CorePartitionedCollectionNameDoc (line 11) | public CorePartitionedCollectionNameDoc()
class CRUDPartitionedCollectionNameAttributeTests (line 19) | public class CRUDPartitionedCollectionNameAttributeTests : MongoDbDocume...
method CRUDPartitionedCollectionNameAttributeTests (line 21) | public CRUDPartitionedCollectionNameAttributeTests(MongoDbTestFixture<...
method GetClassName (line 26) | public override string GetClassName()
FILE: CoreIntegrationTests/CRUDPartitionedTests.cs
class CorePartitionedDoc (line 7) | public class CorePartitionedDoc : TestDoc, IPartitionedDocument
method CorePartitionedDoc (line 9) | public CorePartitionedDoc()
class CRUDPartitionedTests (line 17) | public class CRUDPartitionedTests : MongoDbDocumentTestBase<CorePartitio...
method CRUDPartitionedTests (line 19) | public CRUDPartitionedTests(MongoDbTestFixture<CorePartitionedDoc, Gui...
method GetClassName (line 23) | public override string GetClassName()
FILE: CoreIntegrationTests/CRUDTKeyPartitionedCollectionNameAttributeTests.cs
class CoreTKeyPartitionedCollectionNameDoc (line 11) | [CollectionName("TestingCNameAttrPartTKey")]
method CoreTKeyPartitionedCollectionNameDoc (line 14) | public CoreTKeyPartitionedCollectionNameDoc()
class CRUDTKeyPartitionedCollectionNameAttributeTests (line 22) | public class CRUDTKeyPartitionedCollectionNameAttributeTests : MongoDbTK...
method CRUDTKeyPartitionedCollectionNameAttributeTests (line 24) | public CRUDTKeyPartitionedCollectionNameAttributeTests(MongoDbTestFixt...
method GetClassName (line 29) | public override string GetClassName()
class CoreObjectIdPartitionedCollectionNameDoc (line 40) | [CollectionName("TestingCNameAttrPartObjectId")]
method CoreObjectIdPartitionedCollectionNameDoc (line 43) | public CoreObjectIdPartitionedCollectionNameDoc()
class CRUDObjectIdPartitionedCollectionNameAttributeTests (line 51) | public class CRUDObjectIdPartitionedCollectionNameAttributeTests : Mongo...
method CRUDObjectIdPartitionedCollectionNameAttributeTests (line 53) | public CRUDObjectIdPartitionedCollectionNameAttributeTests(MongoDbTest...
method GetClassName (line 58) | public override string GetClassName()
FILE: CoreIntegrationTests/CRUDTKeyPartitionedTests.cs
class CorePartitionedTKeyTestDocument (line 7) | public class CorePartitionedTKeyTestDocument : TestDoc<Guid>, IPartition...
method CorePartitionedTKeyTestDocument (line 9) | public CorePartitionedTKeyTestDocument()
class CRUDTKeyPartitionedTests (line 16) | public class CRUDTKeyPartitionedTests : MongoDbTKeyDocumentTestBase<Core...
method CRUDTKeyPartitionedTests (line 18) | public CRUDTKeyPartitionedTests(MongoDbTestFixture<CorePartitionedTKey...
method GetClassName (line 23) | public override string GetClassName()
FILE: CoreIntegrationTests/CRUDTKeyTests.cs
class CoreTKeyTestDocument (line 6) | public class CoreTKeyTestDocument : TestDoc<Guid>
class CRUDTKeyTests (line 10) | public class CRUDTKeyTests : MongoDbTKeyDocumentTestBase<CoreTKeyTestDoc...
method CRUDTKeyTests (line 12) | public CRUDTKeyTests(MongoDbTestFixture<CoreTKeyTestDocument, Guid> fi...
method GetClassName (line 17) | public override string GetClassName()
FILE: CoreIntegrationTests/CRUDTests.cs
class CoreTestDocument (line 6) | public class CoreTestDocument : TestDoc
class CRUDTests (line 10) | public class CRUDTests : MongoDbDocumentTestBase<CoreTestDocument>
method CRUDTests (line 12) | public CRUDTests(MongoDbTestFixture<CoreTestDocument, Guid> fixture) :...
method GetClassName (line 16) | public override string GetClassName()
FILE: CoreIntegrationTests/IdentityUserTests.cs
class MongoIdentityUser (line 11) | public class MongoIdentityUser<TKey> : IdentityUser<TKey>, IDocument<TKey>
class IdentityUserTest (line 17) | public class IdentityUserTest : MongoIdentityUser<Guid>, IDocument<Guid>
method IdentityUserTest (line 19) | public IdentityUserTest()
class IdentityUserTests (line 27) | public class IdentityUserTests : BaseMongoDbRepositoryTests<IdentityUser...
method AddOne (line 29) | [Fact]
method AddOneAsync (line 41) | [Fact]
method AddMany (line 53) | [Fact]
method AddManyAsync (line 65) | [Fact]
FILE: CoreIntegrationTests/Infrastructure/BaseMongoDbRepositoryTests.cs
class BaseMongoDbRepositoryTests (line 8) | public class BaseMongoDbRepositoryTests<T> : IDisposable where T : new()
method CreateTestDocument (line 10) | public T CreateTestDocument()
method CreateTestDocuments (line 15) | public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
method BaseMongoDbRepositoryTests (line 28) | public BaseMongoDbRepositoryTests()
method Init (line 45) | public void Init()
method Cleanup (line 51) | public void Cleanup()
method Dispose (line 67) | protected virtual void Dispose(bool disposing)
method Dispose (line 81) | public void Dispose()
FILE: CoreIntegrationTests/Infrastructure/GlobalVariables.cs
class GlobalVariables (line 8) | public static class GlobalVariables
FILE: CoreIntegrationTests/Infrastructure/ITestRepository.cs
type ITestRepository (line 5) | public interface ITestRepository : IBaseMongoRepository
method DropTestCollection (line 7) | void DropTestCollection<TDocument>();
method DropTestCollection (line 8) | void DropTestCollection<TDocument>(string partitionKey);
FILE: CoreIntegrationTests/Infrastructure/MongoDbConfig.cs
class MongoDbConfig (line 6) | internal static class MongoDbConfig
method EnsureConfigured (line 12) | public static void EnsureConfigured()
method EnsureConfiguredImpl (line 17) | private static void EnsureConfiguredImpl()
method Configure (line 26) | private static void Configure()
method RegisterConventions (line 31) | private static void RegisterConventions()
FILE: CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.Main.cs
class MongoDbDocumentTestBase (line 14) | public abstract partial class MongoDbDocumentTestBase<T>
method MongoDbDocumentTestBase (line 20) | protected MongoDbDocumentTestBase(MongoDbTestFixture<T, Guid> fixture)
method CreateTestDocument (line 35) | protected T CreateTestDocument()
method GetClassName (line 40) | public abstract string GetClassName();
method CreateTestDocuments (line 42) | protected List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
method AddOne (line 69) | [Fact]
method AddOneAsync (line 82) | [Fact]
method AddMany (line 95) | [Fact]
method AddManyWithDifferentPartitionKey (line 110) | [Fact]
method AddManyAsync (line 136) | [Fact]
method AddManyAsyncWithDifferentPartitionKey (line 151) | [Fact]
method GetByIdAsync (line 181) | [Fact]
method GetById (line 193) | [Fact]
method GetOneAsync (line 205) | [Fact]
method GetOne (line 217) | [Fact]
method GetCursor (line 229) | [Fact]
method AnyAsyncReturnsTrue (line 242) | [Fact]
method AnyAsyncReturnsFalse (line 254) | [Fact]
method AnyReturnsTrue (line 266) | [Fact]
method AnyReturnsFalse (line 278) | [Fact]
method GetAllAsync (line 290) | [Fact]
method GetAll (line 304) | [Fact]
method CountAsync (line 318) | [Fact]
method Count (line 332) | [Fact]
method DeleteOne (line 350) | [Fact]
method DeleteOneLinq (line 363) | [Fact]
method DeleteOneAsync (line 376) | [Fact]
method DeleteOneAsyncLinq (line 389) | [Fact]
method DeleteManyAsyncLinq (line 402) | [Fact]
method DeleteManyAsync (line 417) | [Fact]
method DeleteManyLinq (line 445) | [Fact]
method DeleteMany (line 460) | [Fact]
method ProjectOneAsync (line 492) | [Fact]
method ProjectOne (line 518) | [Fact]
method ProjectManyAsync (line 544) | [Fact]
method ProjectMany (line 574) | [Fact]
method GetByMaxAsync (line 608) | [Fact]
method GetByMax (line 631) | [Fact]
method GetByMinAsync (line 654) | [Fact]
method GetByMin (line 677) | [Fact]
method GetMinValue (line 700) | [Fact]
method GetMinValueAsync (line 723) | [Fact]
method GetMaxValue (line 746) | [Fact]
method GetMaxValueAsync (line 769) | [Fact]
method CreateTextIndexNoOptionAsync (line 798) | [Fact]
method CreateTextIndexWithOptionAsync (line 823) | [Fact]
method CreateAscendingIndexAsync (line 851) | [Fact]
method CreateDescendingIndexAsync (line 868) | [Fact]
method CreateHashedIndexAsync (line 885) | [Fact]
method CreateCombinedTextIndexAsync (line 902) | [Fact]
method SumByDecimalAsync (line 925) | [Fact]
method SumByDecimal (line 948) | [Fact]
method GetCurrentMethod (line 975) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetParentMethod (line 984) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetTestName (line 993) | private string GetTestName()
method GetContent (line 998) | private string GetContent()
method Cleanup (line 1003) | private void Cleanup()
FILE: CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.Update.cs
class MongoDbDocumentTestBase (line 16) | public abstract partial class MongoDbDocumentTestBase<T> :
method UpdateOne (line 22) | [Fact]
method UpdateOneAsync (line 39) | [Fact]
method UpdateOneField (line 56) | [Fact]
method UpdateOneFieldAsync (line 72) | [Fact]
method UpdateOneFieldWithFilter (line 88) | [Fact]
method UpdateOneFieldWithFilterAsync (line 104) | [Fact]
method UpdateOneAsyncWithUpdateDefinition (line 120) | [Fact]
method UpdateOneWithUpdateDefinition (line 146) | [Fact]
method UpdateManyWithLinqFilterAsync (line 176) | [Fact]
method UpdateManyWithFilterDefinitionAsync (line 194) | [Fact]
method UpdateManyWithLinqFilterAndUpdateDefinitionAsync (line 213) | [Fact]
method UpdateManyWithFilterAndUpdateDefinitionsAsync (line 244) | [Fact]
method UpdateManyWithLinqFilter (line 278) | [Fact]
method UpdateManyWithFilterDefinition (line 295) | [Fact]
method UpdateManyWithLinqFilterAndUpdateDefinition (line 314) | [Fact]
method UpdateManyWithFilterAndUpdateDefinitions (line 345) | [Fact]
FILE: CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.Main.cs
class MongoDbTKeyDocumentTestBase (line 15) | public abstract partial class MongoDbTKeyDocumentTestBase<T, TKey> :
method MongoDbTKeyDocumentTestBase (line 23) | protected MongoDbTKeyDocumentTestBase(MongoDbTestFixture<T, TKey> fixt...
method GetClassName (line 38) | public abstract string GetClassName();
method CreateTestDocument (line 40) | public T CreateTestDocument()
method CreateTestDocuments (line 45) | public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
method AddOne (line 72) | [Fact]
method AddOneAsync (line 85) | [Fact]
method AddMany (line 98) | [Fact]
method AddManyWithDifferentPartitionKey (line 113) | [Fact]
method AddManyAsync (line 139) | [Fact]
method AddManyAsyncWithDifferentPartitionKey (line 154) | [Fact]
method GetByIdAsync (line 184) | [Fact]
method GetById (line 196) | [Fact]
method GetOneByFilterDefinitionAsync (line 208) | [Fact]
method GetOneByFilterDefinition (line 220) | [Fact]
method GetOneAsync (line 232) | [Fact]
method GetOne (line 244) | [Fact]
method GetCursor (line 256) | [Fact]
method AnyAsyncByDefinitionReturnsTrue (line 269) | [Fact]
method AnyAsyncByDefinitionReturnsFalse (line 281) | [Fact]
method AnyAsyncReturnsTrue (line 293) | [Fact]
method AnyAsyncReturnsFalse (line 305) | [Fact]
method AnyByDefinitionReturnsTrue (line 317) | [Fact]
method AnyByDefinitionReturnsFalse (line 329) | [Fact]
method AnyReturnsTrue (line 341) | [Fact]
method AnyReturnsFalse (line 353) | [Fact]
method GetAllByDefinitionAsync (line 365) | [Fact]
method GetAllByDefinition (line 379) | [Fact]
method GetAllAsync (line 393) | [Fact]
method GetAll (line 407) | [Fact]
method CountByDefinitionAsync (line 421) | [Fact]
method CountByDefinition (line 435) | [Fact]
method CountAsync (line 449) | [Fact]
method Count (line 463) | [Fact]
method DeleteOne (line 481) | [Fact]
method DeleteOneLinq (line 494) | [Fact]
method DeleteOneAsync (line 507) | [Fact]
method DeleteOneAsyncLinq (line 520) | [Fact]
method DeleteManyAsyncLinq (line 533) | [Fact]
method DeleteManyAsync (line 548) | [Fact]
method DeleteManyLinq (line 576) | [Fact]
method DeleteMany (line 591) | [Fact]
method ProjectOneAsync (line 623) | [Fact]
method ProjectOne (line 649) | [Fact]
method ProjectManyAsync (line 675) | [Fact]
method ProjectMany (line 705) | [Fact]
method GetByMaxAsync (line 739) | [Fact]
method GetByMax (line 762) | [Fact]
method GetMaxValue (line 785) | [Fact]
method GetMaxValueAsync (line 808) | [Fact]
method GetByMinAsync (line 831) | [Fact]
method GetByMin (line 854) | [Fact]
method GetMinValue (line 877) | [Fact]
method GetMinValueAsync (line 900) | [Fact]
method CreateTextIndexNoOptionAsync (line 929) | [Fact]
method CreateTextIndexWithOptionAsync (line 954) | [Fact]
method CreateAscendingIndexAsync (line 982) | [Fact]
method CreateDescendingIndexAsync (line 999) | [Fact]
method CreateHashedIndexAsync (line 1016) | [Fact]
method CreateCombinedTextIndexAsync (line 1033) | [Fact]
method SumByDecimalAsync (line 1057) | [Fact]
method SumByDecimal (line 1080) | [Fact]
method GroupByTProjection (line 1107) | [Fact]
method FilteredGroupByTProjection (line 1144) | [Fact]
method GetSortedPaginatedAsync (line 1197) | [Fact]
method GetSortedPaginatedAsyncWithSortOptions (line 1234) | [Fact]
method GetCurrentMethod (line 1275) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetParentMethod (line 1284) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetTestName (line 1293) | private string GetTestName()
method GetContent (line 1298) | private string GetContent()
method Cleanup (line 1303) | private void Cleanup()
FILE: CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.Update.cs
class MongoDbTKeyDocumentTestBase (line 10) | public abstract partial class MongoDbTKeyDocumentTestBase<T, TKey> :
method UpdateOne (line 18) | [Fact]
method UpdateOneAsync (line 35) | [Fact]
method UpdateOneField (line 52) | [Fact]
method UpdateOneFieldAsync (line 68) | [Fact]
method UpdateOneFieldWithFilter (line 84) | [Fact]
method UpdateOneFieldWithFilterAsync (line 100) | [Fact]
method UpdateOneAsyncWithUpdateDefinition (line 116) | [Fact]
method UpdateOneWithUpdateDefinition (line 142) | [Fact]
method UpdateManyWithLinqFilterAsync (line 172) | [Fact]
method UpdateManyWithFilterDefinitionAsync (line 190) | [Fact]
method UpdateManyWithLinqFilterAndUpdateDefinitionAsync (line 209) | [Fact]
method UpdateManyWithFilterAndUpdateDefinitionsAsync (line 240) | [Fact]
method UpdateManyWithLinqFilter (line 274) | [Fact]
method UpdateManyWithFilterDefinition (line 291) | [Fact]
method UpdateManyWithLinqFilterAndUpdateDefinition (line 310) | [Fact]
method UpdateManyWithFilterAndUpdateDefinitions (line 341) | [Fact]
FILE: CoreIntegrationTests/Infrastructure/MongoDbTestFixture.cs
class MongoDbTestFixture (line 10) | public class MongoDbTestFixture<T, TKey> : IDisposable
method MongoDbTestFixture (line 17) | public MongoDbTestFixture()
method Dispose (line 25) | public virtual void Dispose()
method CreateTestDocument (line 34) | public T CreateTestDocument()
method CreateTestDocuments (line 41) | public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
FILE: CoreIntegrationTests/Infrastructure/RandomExtensions.cs
class RandomExtensions (line 9) | public static class RandomExtensions
method NextLong (line 18) | public static long NextLong(this Random random, long min, long max)
method NextLong (line 46) | public static long NextLong(this Random random, long max)
method NextLong (line 56) | public static long NextLong(this Random random)
FILE: CoreIntegrationTests/Infrastructure/TestClasses.cs
class ProjectedGroup (line 10) | public class ProjectedGroup
class MyTestProjection (line 16) | public class MyTestProjection
class Nested (line 22) | public class Nested
class Child (line 29) | public class Child
method Child (line 31) | public Child(string type, string value)
class TestDoc (line 41) | public class TestDoc : Document
method TestDoc (line 43) | public TestDoc()
method TestDoc (line 74) | public TestDoc()
method Init (line 94) | public TId Init<TId>()
method InitializeFields (line 99) | private void InitializeFields()
class TestDoc (line 67) | public class TestDoc<TKey> : IDocument<TKey>
method TestDoc (line 43) | public TestDoc()
method TestDoc (line 74) | public TestDoc()
method Init (line 94) | public TId Init<TId>()
method InitializeFields (line 99) | private void InitializeFields()
FILE: CoreIntegrationTests/Infrastructure/TestRepository.cs
type ITestRepository (line 7) | public interface ITestRepository<TKey> : IBaseMongoRepository<TKey> wher...
method DropTestCollection (line 9) | void DropTestCollection<TDocument>();
method DropTestCollection (line 10) | void DropTestCollection<TDocument>(string partitionKey);
class TestTKeyRepository (line 13) | public class TestTKeyRepository<TKey> : BaseMongoRepository<TKey>, ITest...
method TestTKeyRepository (line 18) | private TestTKeyRepository(string connectionString) : base(connectionS...
method DropTestCollection (line 30) | public void DropTestCollection<TDocument>()
method DropTestCollection (line 35) | public void DropTestCollection<TDocument>(string partitionKey)
class TestRepository (line 44) | public sealed class TestRepository : BaseMongoRepository, ITestRepository
method TestRepository (line 52) | static TestRepository()
method TestRepository (line 57) | private TestRepository(string connectionString, string databaseName) :...
method DropTestCollection (line 69) | public void DropTestCollection<TDocument>()
method DropTestCollection (line 74) | public void DropTestCollection<TDocument>(string partitionKey)
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddManyAsyncTests.cs
class AddManyAsyncTests (line 14) | public class AddManyAsyncTests : TestMongoRepositoryContext
method WithDocument_ShouldAddOne (line 16) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 30) | [Fact]
method Keyed_WithDocument_ShouldAddOne (line 47) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldAddOne (line 61) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddManyTests.cs
class AddManyTests (line 13) | public class AddManyTests : TestMongoRepositoryContext
method WithDocument_ShouldAddOne (line 16) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 30) | [Fact]
method Keyed_WithDocument_ShouldAddOne (line 47) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldAddOne (line 61) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddOneAsyncTests.cs
class AddOneAsyncTests (line 13) | public class AddOneAsyncTests : TestMongoRepositoryContext
method WithDocument_ShouldAddOne (line 15) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 29) | [Fact]
method Keyed_WithDocument_ShouldAddOne (line 46) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldAddOne (line 60) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddOneTests.cs
class AddOneTests (line 12) | public class AddOneTests : TestMongoRepositoryContext
method WithDocument_ShouldAddOne (line 14) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 28) | [Fact]
method Keyed_WithDocument_ShouldAddOne (line 45) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldAddOne (line 59) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteManyAsyncTests.cs
class DeleteManyAsyncTests (line 17) | public class DeleteManyAsyncTests : TestMongoRepositoryContext
method WithDocuments_ShouldDeleteMany (line 19) | [Fact]
method WithDocumentsAndCancellationToken_ShouldDeleteMany (line 39) | [Fact]
method WithFilter_ShouldDeleteMany (line 60) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteMany (line 86) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteMany (line 113) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany (line 140) | [Fact]
method Keyed_WithDocuments_ShouldDeleteMany (line 170) | [Fact]
method Keyed_WithDocumentsAndCancellationToken_ShouldDeleteMany (line 190) | [Fact]
method Keyed_WithFilter_ShouldDeleteMany (line 211) | [Fact]
method Keyed_WithFilterAndCancellationToken_ShouldDeleteMany (line 237) | [Fact]
method Keyed_WithFilterAndPartitionKey_ShouldDeleteMany (line 264) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany (line 291) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteManyTests.cs
class DeleteManyTests (line 16) | public class DeleteManyTests : TestMongoRepositoryContext
method WithDocuments_ShouldDeleteMany (line 18) | [Fact]
method WithDocumentsAndCancellationToken_ShouldDeleteMany (line 38) | [Fact]
method WithFilter_ShouldDeleteMany (line 59) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteMany (line 82) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteMany (line 106) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany (line 130) | [Fact]
method Keyed_WithDocuments_ShouldDeleteMany (line 157) | [Fact]
method Keyed_WithDocumentsAndCancellationToken_ShouldDeleteMany (line 177) | [Fact]
method Keyed_WithFilter_ShouldDeleteMany (line 198) | [Fact]
method Keyed_WithFilterAndCancellationToken_ShouldDeleteMany (line 221) | [Fact]
method Keyed_WithFilterAndPartitionKey_ShouldDeleteMany (line 245) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany (line 269) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteOneAsyncTests.cs
class DeleteOneAsyncTests (line 15) | public class DeleteOneAsyncTests : TestMongoRepositoryContext
method WithDocument_ShouldDeleteOne (line 17) | [Fact]
method WithDocumentAndCancellationToken_ShouldDeleteOne (line 37) | [Fact]
method WithFilter_ShouldDeleteOne (line 59) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteOne (line 82) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteOne (line 106) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne (line 130) | [Fact]
method Keyed_WithDocument_ShouldDeleteOne (line 157) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldDeleteOne (line 177) | [Fact]
method Keyed_WithFilter_ShouldDeleteOne (line 199) | [Fact]
method Keyed_WithFilterAndCancellationToken_ShouldDeleteOne (line 222) | [Fact]
method Keyed_WithFilterAndPartitionKey_ShouldDeleteOne (line 246) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne (line 270) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteOneTests.cs
class DeleteOneTests (line 14) | public class DeleteOneTests : TestMongoRepositoryContext
method WithDocument_ShouldDeleteOne (line 16) | [Fact]
method WithDocumentAndCancellationToken_ShouldDeleteOne (line 36) | [Fact]
method WithFilter_ShouldDeleteOne (line 57) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteOne (line 80) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteOne (line 108) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne (line 136) | [Fact]
method WithKeyedDocument_ShouldDeleteOne (line 165) | [Fact]
method WithKeyedDocumentAndCancellationToken_ShouldDeleteOne (line 185) | [Fact]
method Keyed_WithFilter_ShouldDeleteOne (line 206) | [Fact]
method Keyed_WithFilterAndCancellationToken_ShouldDeleteOne (line 233) | [Fact]
method Keyed_WithFilterAndPartitionKey_ShouldDeleteOne (line 261) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne (line 289) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/BaseIndexTests.cs
class BaseIndexTests (line 8) | public class BaseIndexTests : TestMongoRepositoryContext
method SetupIndex (line 10) | protected static Mock<IAsyncCursor<BsonDocument>> SetupIndex<TDocument...
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateAscendingIndexAsyncTests.cs
class CreateAscendingIndexAsyncTests (line 14) | public class CreateAscendingIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
method Keyed_WithFieldExpression_CreatesIndex (line 157) | [Fact]
method Keyed_WithFieldExpressionAndCancellationToken_CreatesIndex (line 171) | [Fact]
method Keyed_WithFieldExpressionAndOptions_CreatesIndex (line 186) | [Fact]
method Keyed_WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 203) | [Fact]
method Keyed_WithFieldExpressionAndPartitionKey_CreatesIndex (line 221) | [Fact]
method Keyed_WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 237) | [Fact]
method Keyed_WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 254) | [Fact]
method Keyed_WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 273) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateCombinedTextIndexAsyncTests.cs
class CreateCombinedTextIndexAsyncTests (line 15) | public class CreateCombinedTextIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 20) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 34) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 49) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 66) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 84) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 100) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 117) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 136) | [Fact]
method Keyed_WithKeyedFieldExpression_CreatesIndex (line 158) | [Fact]
method Keyed_WithKeyedFieldExpressionAndCancellationToken_CreatesIndex (line 172) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptions_CreatesIndex (line 187) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 204) | [Fact]
method Keyed_WithKeyedFieldExpressionAndPartitionKey_CreatesIndex (line 222) | [Fact]
method Keyed_WithKeyedFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 238) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 255) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 274) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateDescendingIndexAsyncTests.cs
class CreateDescendingIndexAsyncTests (line 14) | public class CreateDescendingIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
method Keyed_WithFieldExpression_CreatesIndex (line 157) | [Fact]
method Keyed_WithFieldExpressionAndCancellationToken_CreatesIndex (line 171) | [Fact]
method Keyed_WithFieldExpressionAndOptions_CreatesIndex (line 186) | [Fact]
method Keyed_WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 203) | [Fact]
method Keyed_WithFieldExpressionAndPartitionKey_CreatesIndex (line 221) | [Fact]
method Keyed_WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 237) | [Fact]
method Keyed_WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 254) | [Fact]
method Keyed_WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 273) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateHashedIndexAsyncTests.cs
class CreateHashedIndexAsyncTests (line 14) | public class CreateHashedIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
method Keyed_WithKeyedFieldExpression_CreatesIndex (line 157) | [Fact]
method Keyed_WithKeyedFieldExpressionAndCancellationToken_CreatesIndex (line 171) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptions_CreatesIndex (line 186) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 203) | [Fact]
method Keyed_WithKeyedFieldExpressionAndPartitionKey_CreatesIndex (line 221) | [Fact]
method Keyed_WithKeyedFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 237) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 254) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 273) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateTextIndexAsyncTests.cs
class CreateTextIndexAsyncTests (line 14) | public class CreateTextIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
method Keyed_WithKeyedFieldExpression_CreatesIndex (line 157) | [Fact]
method Keyed_WithKeyedFieldExpressionAndCancellationToken_CreatesIndex (line 171) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptions_CreatesIndex (line 186) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 203) | [Fact]
method Keyed_WithKeyedFieldExpressionAndPartitionKey_CreatesIndex (line 221) | [Fact]
method Keyed_WithKeyedFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 237) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 254) | [Fact]
method Keyed_WithKeyedFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 273) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/DropIndexAsyncTests.cs
class DropIndexAsyncTests (line 12) | public class DropIndexAsyncTests: BaseIndexTests
method WitIndexName_DropsIndex (line 14) | [Fact]
method WitIndexNameAndCancellationToken_DropsIndex (line 29) | [Fact]
method WitIndexNameAndPartitionKey_DropsIndex (line 45) | [Fact]
method WitIndexNameAndPartitionKeyAndCancellationToken_DropsIndex (line 61) | [Fact]
method Keyed_WithIndexName_DropsIndex (line 80) | [Fact]
method Keyed_WithIndexNameAndCancellationToken_DropsIndex (line 95) | [Fact]
method Keyed_WithIndexNameAndPartitionKey_DropsIndex (line 111) | [Fact]
method Keyed_WithIndexNameAndPartitionKeyAndCancellationToken_DropsIndex (line 127) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/IndexTests/GetIndexNamesAsyncTests.cs
class GetIndexNamesAsyncTests (line 13) | public class GetIndexNamesAsyncTests : BaseIndexTests
method WithNoParameters_ReturnsIndexNames (line 15) | [Fact]
method WithCancellationToken_ReturnsIndexNames (line 35) | [Fact]
method WithPartitionKey_ReturnsIndexNames (line 56) | [Fact]
method WithPartitionKeyAndCancellationToken_ReturnsIndexNames (line 77) | [Fact]
method Keyed_WithNoParameters_ReturnsIndexNames (line 99) | [Fact]
method Keyed_WithCancellationToken_ReturnsIndexNames (line 119) | [Fact]
method Keyed_WithPartitionKey_ReturnsIndexNames (line 140) | [Fact]
method Keyed_WithPartitionKeyAndCancellationToken_ReturnsIndexNames (line 161) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateManyAsyncTests.cs
class UpdateManyAsyncTests (line 16) | public class UpdateManyAsyncTests : TestMongoRepositoryContext
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 23) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 55) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 88) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 121) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 155) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 188) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 221) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 254) | [Fact]
method WithFilterExpressionAndUpdateDefinition_ShouldUpdateOne (line 288) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 318) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 349) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 380) | [Fact]
method WithFilterDefinitionAndUpdateDefinition_ShouldUpdateOne (line 411) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionCancellationToken_ShouldUpdateOne (line 441) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 472) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 503) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 543) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 575) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 608) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 641) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 675) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 708) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 741) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 774) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinition_ShouldUpdateOne (line 808) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 838) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 869) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 900) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinition_ShouldUpdateOne (line 931) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinitionCancellationToken_ShouldUpdateOne (line 961) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 992) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 1023) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateManyTests.cs
class UpdateManyTests (line 15) | public class UpdateManyTests : TestMongoRepositoryContext
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 23) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 55) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 88) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 121) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 155) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 188) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 221) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 254) | [Fact]
method WithFilterExpressionAndUpdateDefinition_ShouldUpdateOne (line 288) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 318) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 349) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 380) | [Fact]
method WithFilterDefinitionAndUpdateDefinition_ShouldUpdateOne (line 411) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionCancellationToken_ShouldUpdateOne (line 441) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 472) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 503) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 541) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 573) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 606) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 639) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 673) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 706) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 739) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 772) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinition_ShouldUpdateOne (line 806) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 836) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 867) | [Fact]
method Keyed_WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 898) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinition_ShouldUpdateOne (line 929) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinitionCancellationToken_ShouldUpdateOne (line 959) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 990) | [Fact]
method Keyed_WithFilterDefinitionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 1021) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateOneAsyncTests.cs
class UpdateOneAsyncTests (line 16) | public class UpdateOneAsyncTests : TestMongoRepositoryContext
method WithDocument_ShouldUpdateOne (line 23) | [Fact]
method WithDocumentAndCancellationToken_ShouldUpdateOne (line 41) | [Fact]
method WithDocumentAndUpdateDefinition_ShouldUpdateOne (line 60) | [Fact]
method WithDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 87) | [Fact]
method WithDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 115) | [Fact]
method WithDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 145) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 176) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 207) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 239) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 271) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 304) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 336) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 368) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 400) | [Fact]
method Keyed_WithDocument_ShouldUpdateOne (line 440) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldUpdateOne (line 458) | [Fact]
method Keyed_WithDocumentAndUpdateDefinition_ShouldUpdateOne (line 477) | [Fact]
method Keyed_WithDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 504) | [Fact]
method Keyed_WithDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 532) | [Fact]
method Keyed_WithDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 562) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 593) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 624) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 656) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 688) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 721) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 754) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 787) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 820) | [Fact]
method Keyed_WithClientSessionHandlerAndDocument_ShouldUpdateOne (line 858) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndCancellationToken_ShouldUpdateOne (line 885) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndUpdateDefinition_ShouldUpdateOne (line 908) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 938) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 969) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 1002) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 1036) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 1070) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 1105) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 1140) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 1176) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 1211) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 1246) | [Fact]
method Keyed_WithClientSessionHandlerAndFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 1281) | [Fact]
FILE: CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateOneTests.cs
class UpdateOneTests (line 15) | public class UpdateOneTests : TestMongoRepositoryContext
method WithDocument_ShouldUpdateOne (line 22) | [Fact]
method WithDocumentAndCancellationToken_ShouldUpdateOne (line 40) | [Fact]
method WithDocumentAndUpdateDefinition_ShouldUpdateOne (line 59) | [Fact]
method WithDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 86) | [Fact]
method WithDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 114) | [Fact]
method WithDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 144) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 175) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 206) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 238) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 270) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 303) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 335) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 367) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 399) | [Fact]
method Keyed_WithDocument_ShouldUpdateOne (line 439) | [Fact]
method Keyed_WithDocumentAndCancellationToken_ShouldUpdateOne (line 457) | [Fact]
method Keyed_WithDocumentAndUpdateDefinition_ShouldUpdateOne (line 476) | [Fact]
method Keyed_WithDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 503) | [Fact]
method Keyed_WithDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 531) | [Fact]
method Keyed_WithDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 561) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 592) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 623) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 655) | [Fact]
method Keyed_WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 687) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 720) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 752) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 784) | [Fact]
method Keyed_WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 816) | [Fact]
method Keyed_WithClientSessionHandlerAndDocument_ShouldUpdateOne (line 853) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndCancellationToken_ShouldUpdateOne (line 878) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndUpdateDefinition_ShouldUpdateOne (line 901) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 931) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 962) | [Fact]
method Keyed_WithClientSessionHandlerAndDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 995) | [Fact]
method Keyed_WithClientSessionHandlerFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 1029) | [Fact]
method Keyed_WithClientSessionHandlerFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 1063) | [Fact]
method Keyed_WithClientSessionHandlerFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 1098) | [Fact]
method Keyed_WithClientSessionHandlerFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 1133) | [Fact]
method Keyed_WithClientSessionHandlerFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 1169) | [Fact]
method Keyed_WithClientSessionHandlerFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 1205) | [Fact]
method Keyed_WithClientSessionHandlerFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 1241) | [Fact]
method Keyed_WithClientSessionHandlerFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 1277) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddManyAsyncTests.cs
class AddManyAsyncTests (line 18) | public class AddManyAsyncTests : GenericTestContext<MongoDbCreator>
method WithDocuments_AddsMany (line 20) | [Fact]
method WithDocumentsHavingNoId_SetsId (line 44) | [Fact]
method WithPartitionedDocument_AddsMany (line 74) | [Fact]
method WithDocumentsAndCancellationToken_AddsMany (line 105) | [Fact]
method WithPartitionedDocumentAndCancellationToken_AddsOne (line 130) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddManyTests.cs
class AddManyTests (line 18) | public class AddManyTests : GenericTestContext<MongoDbCreator>
method WithDocuments_AddsMany (line 20) | [Fact]
method WithDocumentsHavingNoId_SetsId (line 44) | [Fact]
method WithPartitionedDocument_AddsMany (line 74) | [Fact]
method WithDocumentsAndCancellationToken_AddsMany (line 105) | [Fact]
method WithPartitionedDocumentAndCancellationToken_AddsOne (line 130) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddOneAsyncTests.cs
class AddOneAsyncTests (line 16) | public class AddOneAsyncTests : GenericTestContext<MongoDbCreator>
method WithDocument_AddsOne (line 18) | [Fact]
method WithDocumentHavingNoId_SetsId (line 42) | [Fact]
method WithPartitionedDocument_AddsOne (line 68) | [Fact]
method WithDocumentAndCancellationToken_AddsOne (line 98) | [Fact]
method WithPartitionedDocumentAndCancellationToken_AddsOne (line 123) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddOneTests.cs
class AddOneTests (line 15) | public class AddOneTests : GenericTestContext<MongoDbCreator>
method WithDocument_AddsOne (line 17) | [Fact]
method WithDocumentHavingNoId_SetsId (line 41) | [Fact]
method WithPartitionedDocument_AddsOne (line 67) | [Fact]
method WithDocumentAndCancellationToken_AddsOne (line 97) | [Fact]
method WithPartitionedDocumentAndCancellationToken_AddsOne (line 122) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteManyAsyncTests.cs
class DeleteManyAsyncTests (line 19) | public class DeleteManyAsyncTests : GenericTestContext<MongoDbEraser>
method WithEmptyDocuments_DeletesNothing (line 21) | [Fact]
method WithDocumentsAndCancellationToken_DeletesMany (line 50) | [Fact]
method WithPartitionDocumentsAndCancellationToken_DeletesMany (line 83) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_DeletesOne (line 123) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteManyTests.cs
class DeleteManyTests (line 19) | public class DeleteManyTests : GenericTestContext<MongoDbEraser>
method WithEmptyDocuments_DeletesNothing (line 21) | [Fact]
method WithDocumentsAndCancellationToken_DeletesMany (line 50) | [Fact]
method WithPartitionDocumentsAndCancellationToken_DeletesMany (line 83) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_DeletesOne (line 123) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteOneAsyncTests.cs
class DeleteOneAsyncTests (line 17) | public class DeleteOneAsyncTests : GenericTestContext<MongoDbEraser>
method WithDocumentAndCancellationToken_DeletesOne (line 19) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_DeletesOne (line 51) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteOneTests.cs
class DeleteOneTests (line 16) | public class DeleteOneTests : GenericTestContext<MongoDbEraser>
method WithDocumentAndCancellationToken_DeletesOne (line 18) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_DeletesOne (line 50) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/BaseIndexTests.cs
class BaseIndexTests (line 11) | public class BaseIndexTests : GenericTestContext<MongoDbIndexHandler>
method SetupIndexes (line 13) | protected (Mock<IAsyncCursor<BsonDocument>>, Mock<IMongoIndexManager<T...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateAscendingIndexAsyncTests.cs
class CreateAscendingIndexAsyncTests (line 17) | public class CreateAscendingIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 21) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 44) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 70) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 97) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 123) | [Fact]
method SetupContext (line 153) | private Mock<IMongoDbContext> SetupContext(Mock<IMongoCollection<TestD...
method SetupIndexManager (line 163) | private Mock<IMongoIndexManager<TDocument>> SetupIndexManager<TDocumen...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateCombinedTextIndexAsyncTests.cs
class CreateCombinedTextIndexAsyncTests (line 19) | public class CreateCombinedTextIndexAsyncTests : BaseIndexTests
method CreateCombinedTextIndexAsyncTests (line 28) | public CreateCombinedTextIndexAsyncTests(ITestOutputHelper testOutputH...
method WithFieldExpression_CreatesIndex (line 31) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 54) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 80) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 107) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 133) | [Fact]
method SetupContext (line 163) | private Mock<IMongoDbContext> SetupContext(Mock<IMongoCollection<TestD...
method SetupIndexManager (line 173) | private Mock<IMongoIndexManager<TDocument>> SetupIndexManager<TDocumen...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateDescendingIndexAsyncTests.cs
class CreateDescendingIndexAsyncTests (line 17) | public class CreateDescendingIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 21) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 44) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 70) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 97) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 123) | [Fact]
method SetupContext (line 153) | private Mock<IMongoDbContext> SetupContext(Mock<IMongoCollection<TestD...
method SetupIndexManager (line 163) | private Mock<IMongoIndexManager<TDocument>> SetupIndexManager<TDocumen...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateHashedIndexAsyncTests.cs
class CreateHashedIndexAsyncTests (line 18) | public class CreateHashedIndexAsyncTests : BaseIndexTests
method CreateHashedIndexAsyncTests (line 23) | public CreateHashedIndexAsyncTests(ITestOutputHelper testOutputHelper)
method WithFieldExpression_CreatesIndex (line 26) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 49) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 75) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 102) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 128) | [Fact]
method SetupContext (line 158) | private Mock<IMongoDbContext> SetupContext(Mock<IMongoCollection<TestD...
method SetupIndexManager (line 168) | private Mock<IMongoIndexManager<TDocument>> SetupIndexManager<TDocumen...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateTextIndexAsyncTests.cs
class CreateTextIndexAsyncTests (line 17) | public class CreateTextIndexAsyncTests : BaseIndexTests
method WithFieldExpression_CreatesIndex (line 21) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 44) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 70) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 97) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 123) | [Fact]
method SetupContext (line 153) | private Mock<IMongoDbContext> SetupContext<TDocument>(Mock<IMongoColle...
method SetupIndexManager (line 163) | private Mock<IMongoIndexManager<TDocument>> SetupIndexManager<TDocumen...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/DropIndexAsyncTests.cs
class DropIndexAsyncTests (line 13) | public class DropIndexAsyncTests : BaseIndexTests
method WithIndexName_DropsIndex (line 15) | [Fact]
method WithIndexNameAndPartitionKey_DropsIndex (line 32) | [Fact]
method WithIndexNameAndCancellationToken_DropsIndex (line 52) | [Fact]
method WithIndexNameAndPartitionKeyAndCancellationToken_DropsIndex (line 71) | [Fact]
method SetupContext (line 92) | private Mock<IMongoDbContext> SetupContext(Mock<IMongoCollection<TestD...
method SetupIndexManager (line 102) | private Mock<IMongoIndexManager<TDocument>> SetupIndexManager<TDocumen...
FILE: CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/GetIndexNamesAsyncTests.cs
class GetIndexNamesAsyncTests (line 16) | public class GetIndexNamesAsyncTests : BaseIndexTests
method WithNoParameters_ReturnsAllIndexNames (line 18) | [Fact]
method WithPartitionKey_ReturnsAllIndexNames (line 45) | [Fact]
method WithCancellationToken_ReturnsAllIndexNames (line 73) | [Fact]
method WithPartitionKeyCancellationToken_ReturnsAllIndexNames (line 101) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/AnyAsyncTests.cs
class AnyAsyncTests (line 16) | public class AnyAsyncTests : BaseReaderTests
method WithFilter_ReturnsResult (line 20) | [Fact]
method WithFilterAndCancellationToken_ReturnsResult (line 52) | [Fact]
method WithFilterAndPartitionKey_ReturnsResult (line 84) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ReturnsResult (line 117) | [Fact]
method WithCondition_ReturnsResult (line 151) | [Fact]
method WithConditionAndCancellationToken_ReturnsResult (line 183) | [Fact]
method WithConditionAndPartitionKey_ReturnsResult (line 216) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_ReturnsResult (line 249) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/AnyTests.cs
class AnyTests (line 15) | public class AnyTests : BaseReaderTests
method WithFilter_ReturnsResult (line 19) | [Fact]
method WithFilterAndCancellationToken_ReturnsResult (line 51) | [Fact]
method WithFilterAndPartitionKey_ReturnsResult (line 83) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ReturnsResult (line 116) | [Fact]
method WithCondition_ReturnsResult (line 150) | [Fact]
method WithConditionAndCancellationToken_ReturnsResult (line 182) | [Fact]
method WithConditionAndPartitionKey_ReturnsResult (line 215) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_ReturnsResult (line 248) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/BaseReaderTests.cs
class BaseReaderTests (line 10) | public class BaseReaderTests : GenericTestContext<MongoDbReader>
method SetupSyncCursor (line 12) | protected Mock<IAsyncCursor<TDocument>> SetupSyncCursor<TDocument>(Lis...
method SetupAsyncCursor (line 32) | protected Mock<IAsyncCursor<TDocument>> SetupAsyncCursor<TDocument>(Li...
method SetupFindAsync (line 52) | protected static void SetupFindAsync<TDocument, TProjection>(Mock<IMon...
method SetupFindSync (line 61) | protected static void SetupFindSync<TDocument, TProjection>(Mock<IMong...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/CountAsyncTests.cs
class CountAsyncTests (line 16) | public class CountAsyncTests : BaseReaderTests
method WithFilter_ReturnsResult (line 20) | [Fact]
method WithFilterAndCancellationToken_ReturnsResult (line 52) | [Fact]
method WithFilterAndPartitionKey_ReturnsResult (line 84) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ReturnsResult (line 117) | [Fact]
method WithCondition_ReturnsResult (line 151) | [Fact]
method WithConditionAndCancellationToken_ReturnsResult (line 183) | [Fact]
method WithConditionAndPartitionKey_ReturnsResult (line 216) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_ReturnsResult (line 249) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/CountTests.cs
class CountTests (line 15) | public class CountTests : BaseReaderTests
method WithFilter_ReturnsResult (line 19) | [Fact]
method WithFilterAndCancellationToken_ReturnsResult (line 51) | [Fact]
method WithFilterAndPartitionKey_ReturnsResult (line 83) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ReturnsResult (line 116) | [Fact]
method WithCondition_ReturnsResult (line 150) | [Fact]
method WithConditionAndCancellationToken_ReturnsResult (line 182) | [Fact]
method WithConditionAndPartitionKey_ReturnsResult (line 215) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_ReturnsResult (line 248) | [Fact]
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetAllAsyncTests.cs
class GetAllAsyncTests (line 17) | public class GetAllAsyncTests : BaseReaderTests
method WithFilter_GetsMatchingDocuments (line 19) | [Fact]
method WithFilterAndCancellationToken_GetsMatchingDocuments (line 40) | [Fact]
method WithFilterAndPartitionKey_GetsMatchingDocuments (line 61) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 82) | [Fact]
method WithCondition_GetsMatchingDocuments (line 104) | [Fact]
method WithConditionAndCancellationToken_GetsMatchingDocuments (line 124) | [Fact]
method WithConditionAndPartitionKey_GetsMatchingDocuments (line 145) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 166) | [Fact]
method WithConditionAndFindOptions_GetsMatchingDocuments (line 188) | [Fact]
method WithConditionAndFindOptionsAndCancellationToken_GetsMatchingDocuments (line 213) | [Fact]
method WithConditionAndFindOptionsAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 239) | [Fact]
method SetupAsyncGet (line 266) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupAs...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetAllTests.cs
class GetAllTests (line 16) | public class GetAllTests : BaseReaderTests
method WithFilter_GetsMatchingDocuments (line 18) | [Fact]
method WithFilterAndCancellationToken_GetsMatchingDocuments (line 39) | [Fact]
method WithFilterAndPartitionKey_GetsMatchingDocuments (line 60) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 81) | [Fact]
method WithCondition_GetsMatchingDocuments (line 103) | [Fact]
method WithConditionAndCancellationToken_GetsMatchingDocuments (line 123) | [Fact]
method WithConditionAndPartitionKey_GetsMatchingDocuments (line 144) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 165) | [Fact]
method WithConditionAndFindOptions_GetsMatchingDocuments (line 187) | [Fact]
method WithConditionAndFindOptionsAndCancellationToken_GetsMatchingDocuments (line 212) | [Fact]
method WithConditionAndFindOptionsAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 238) | [Fact]
method SetupGet (line 265) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupGe...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByIdAsyncTests.cs
class GetByIdAsyncTests (line 16) | public class GetByIdAsyncTests : BaseReaderTests
method WithId_GetsMatchingDocument (line 18) | [Fact]
method WithIdAndCancellationToken_GetsMatchingDocument (line 37) | [Fact]
method WithIdAndPartitionKey_GetsMatchingDocument (line 57) | [Fact]
method WithIdAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 77) | [Fact]
method SetupAsyncGet (line 98) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupAs...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByIdTests.cs
class GetByIdTests (line 15) | public class GetByIdTests : BaseReaderTests
method WithId_GetsMatchingDocument (line 17) | [Fact]
method WithIdAndCancellationToken_GetsMatchingDocument (line 36) | [Fact]
method WithIdAndPartitionKey_GetsMatchingDocument (line 56) | [Fact]
method WithIdAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 76) | [Fact]
method SetupAsyncGet (line 97) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupAs...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMaxAsyncTests.cs
class GetByMaxAsyncTests (line 17) | public class GetByMaxAsyncTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 22) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 41) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 61) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 81) | [Fact]
method SetupAsyncGet (line 102) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupAs...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMaxTests.cs
class GetByMaxTests (line 17) | public class GetByMaxTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 22) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 41) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 61) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 81) | [Fact]
method SetupSyncGet (line 102) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupSy...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMinAsyncTests.cs
class GetByMinAsyncTests (line 17) | public class GetByMinAsyncTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 22) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 41) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 61) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 81) | [Fact]
method SetupAsyncGet (line 102) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupAs...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMinTests.cs
class GetByMinTests (line 17) | public class GetByMinTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 22) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 41) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 61) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 81) | [Fact]
method SetupSyncGet (line 102) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupSy...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMaxValueAsyncTests .cs
class GetMaxValueAsyncTests (line 16) | public class GetMaxValueAsyncTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 21) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 77) | [Fact]
method SetupAsyncGet (line 97) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TValue>>) SetupAsync...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMaxValueTests .cs
class GetMaxValueTests (line 16) | public class GetMaxValueTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 21) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 77) | [Fact]
method SetupSyncGet (line 97) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TValue>>) SetupSyncG...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMinValueAsyncTests .cs
class GetMinValueAsyncTests (line 16) | public class GetMinValueAsyncTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 21) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 77) | [Fact]
method SetupAsyncGet (line 97) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TValue>>) SetupAsync...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMinValueTests .cs
class GetMinValueTests (line 16) | public class GetMinValueTests : BaseReaderTests
method WithFilterAndSelector_GetsMatchingDocument (line 21) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMatchingDocument (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMatchingDocument (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMatchingDocument (line 77) | [Fact]
method SetupSyncGet (line 97) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TValue>>) SetupSyncG...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetOneAsyncTests.cs
class GetOneAsyncTests (line 17) | public class GetOneAsyncTests : BaseReaderTests
method WithFilter_GetsMatchingDocuments (line 19) | [Fact]
method WithFilterAndCancellationToken_GetsMatchingDocuments (line 40) | [Fact]
method WithFilterAndPartitionKey_GetsMatchingDocuments (line 61) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 82) | [Fact]
method WithCondition_GetsMatchingDocuments (line 104) | [Fact]
method WithConditionAndCancellationToken_GetsMatchingDocuments (line 124) | [Fact]
method WithConditionAndPartitionKey_GetsMatchingDocuments (line 145) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 166) | [Fact]
method WithConditionAndFindOptions_GetsMatchingDocuments (line 188) | [Fact]
method WithConditionAndFindOptionsAndCancellationToken_GetsMatchingDocuments (line 213) | [Fact]
method WithConditionAndFindOptionsAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 239) | [Fact]
method SetupAsyncGet (line 266) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupAs...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetOneTests.cs
class GetOneTests (line 16) | public class GetOneTests : BaseReaderTests
method WithFilter_GetsMatchingDocuments (line 18) | [Fact]
method WithFilterAndCancellationToken_GetsMatchingDocuments (line 39) | [Fact]
method WithFilterAndPartitionKey_GetsMatchingDocuments (line 60) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 81) | [Fact]
method WithCondition_GetsMatchingDocuments (line 103) | [Fact]
method WithConditionAndCancellationToken_GetsMatchingDocuments (line 123) | [Fact]
method WithConditionAndPartitionKey_GetsMatchingDocuments (line 144) | [Fact]
method WithConditionAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 165) | [Fact]
method WithConditionAndFindOptions_GetsMatchingDocuments (line 187) | [Fact]
method WithConditionAndFindOptionsAndCancellationToken_GetsMatchingDocuments (line 212) | [Fact]
method WithConditionAndFindOptionsAndPartitionKeyAndCancellationToken_GetsMatchingDocuments (line 238) | [Fact]
method SetupSyncGet (line 265) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TDocument>>) SetupSy...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectManyAsyncTests.cs
class ProjectManyAsyncTests (line 17) | public class ProjectManyAsyncTests : BaseReaderTests
method WithFilterAndProjection_Projects (line 24) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 42) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 61) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 80) | [Fact]
method SetupAsyncProjection (line 100) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TProjection>>) Setup...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectManyTests.cs
class ProjectManyTests (line 17) | public class ProjectManyTests : BaseReaderTests
method WithFilterAndProjection_Projects (line 24) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 42) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 61) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 80) | [Fact]
method SetupAsyncProjection (line 100) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TProjection>>) Setup...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectOneAsyncTests.cs
class ProjectOneAsyncTests (line 17) | public class ProjectOneAsyncTests : BaseReaderTests
method WithFilterAndProjection_Projects (line 24) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 43) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 63) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 83) | [Fact]
method SetupAsyncProjection (line 104) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TProjection>>) Setup...
FILE: CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectOneTests.cs
class ProjectOneTests (line 17) | public class ProjectOneTests : BaseReaderTests
method WithFilterAndProjection_Projects (line 24) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 43) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 63) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 83) | [Fact]
method SetupProjection (line 104) | private (Mock<IMongoDbContext>, Mock<IAsyncCursor<TProjection>>) Setup...
FILE: CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateManyAsyncTests.cs
class UpdateManyAsyncTests (line 18) | public class UpdateManyAsyncTests : GenericTestContext<MongoDbUpdater>
method WithFilterAndUpdateDefinition_UpdatesMany (line 20) | [Fact]
method WithFilterAndUpdateDefinitionAndCancellationToken_UpdatesMany (line 48) | [Fact]
method WithFilterAndUpdateDefinitionAndPartitionKey_UpdatesMany (line 78) | [Fact]
method WithFilterAndUpdateDefinitionAndPartitionKeyAndCancellationToken_UpdatesMany (line 108) | [Fact]
method WithFilterAndFieldExpressionAndValue_UpdatesMany (line 140) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKey_UpdatesMany (line 171) | [Fact]
method WithFilterAndFieldExpressionAndValueAndCancellationToken_UpdatesMany (line 203) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_UpdatesMany (line 235) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_UpdatesMany (line 269) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_UpdatesMany (line 300) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_UpdatesMany (line 333) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_UpdatesMany (line 367) | [Fact]
method WithFilterExpressionAndUpdateDefinition_UpdatesMany (line 402) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndCancellationToken_UpdatesMany (line 432) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKey_UpdatesMany (line 464) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_UpdatesMany (line 497) | [Fact]
method SetupCollection (line 531) | private Mock<IMongoCollection<TestDocument>> SetupCollection(long coun...
FILE: CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateManyTests.cs
class UpdateManyTests (line 17) | public class UpdateManyTests : GenericTestContext<MongoDbUpdater>
method WithFilterAndUpdateDefinition_UpdatesMany (line 19) | [Fact]
method WithFilterAndUpdateDefinitionAndCancellationToken_UpdatesMany (line 47) | [Fact]
method WithFilterAndUpdateDefinitionAndPartitionKey_UpdatesMany (line 77) | [Fact]
method WithFilterAndUpdateDefinitionAndPartitionKeyAndCancellationToken_UpdatesMany (line 107) | [Fact]
method WithFilterAndFieldExpressionAndValue_UpdatesMany (line 139) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKey_UpdatesMany (line 170) | [Fact]
method WithFilterAndFieldExpressionAndValueAndCancellationToken_UpdatesMany (line 202) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_UpdatesMany (line 234) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_UpdatesMany (line 268) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_UpdatesMany (line 299) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_UpdatesMany (line 332) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_UpdatesMany (line 366) | [Fact]
method WithFilterExpressionAndUpdateDefinition_UpdatesMany (line 401) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndCancellationToken_UpdatesMany (line 431) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKey_UpdatesMany (line 463) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_UpdatesMany (line 496) | [Fact]
method SetupCollection (line 530) | private Mock<IMongoCollection<TestDocument>> SetupCollection(long coun...
FILE: CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateOneAsyncTests.cs
class UpdateOneAsyncTests (line 18) | public class UpdateOneAsyncTests : GenericTestContext<MongoDbUpdater>
method WithDocument_ReplacesOne (line 20) | [Fact]
method WithDocumentAndCancellationToken_ReplacesOne (line 46) | [Fact]
method WithDocumentAndUpdateDefinition_ReplacesOne (line 72) | [Fact]
method WithDocumentAndUpdateDefinitionAndCancellationToken_ReplacesOne (line 97) | [Fact]
method WithDocumentAndFieldExpressionAndValue_ReplacesOne (line 123) | [Fact]
method WithDocumentAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 150) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 178) | [Fact]
method WithFilterAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 209) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 240) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 273) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 305) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 338) | [Fact]
method WithClientSessionAndDocument_ReplacesOne (line 372) | [Fact]
method WithClientSessionAndDocumentAndCancellationToken_ReplacesOne (line 400) | [Fact]
method WithClientSessionAndDocumentAndUpdateDefinition_ReplacesOne (line 428) | [Fact]
method WithClientSessionAndDocumentAndUpdateDefinitionAndCancellationToken_ReplacesOne (line 455) | [Fact]
method WithClientSessionAndDocumentAndFieldExpressionAndValue_ReplacesOne (line 483) | [Fact]
method WithClientSessionAndDocumentAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 512) | [Fact]
method WithClientSessionAndFilterAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 542) | [Fact]
method WithClientSessionAndFilterAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 576) | [Fact]
method WithClientSessionAndFilterAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 610) | [Fact]
method WithClientSessionAndFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 646) | [Fact]
method WithClientSessionAndFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 681) | [Fact]
method WithClientSessionAndFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 717) | [Fact]
method SetupCollection (line 754) | private Mock<IMongoCollection<TestDocument>> SetupCollection(string pa...
FILE: CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateOneTests.cs
class UpdateOneTests (line 17) | public class UpdateOneTests : GenericTestContext<MongoDbUpdater>
method WithDocument_ReplacesOne (line 19) | [Fact]
method WithDocumentAndCancellationToken_ReplacesOne (line 45) | [Fact]
method WithDocumentAndUpdateDefinition_ReplacesOne (line 71) | [Fact]
method WithDocumentAndUpdateDefinitionAndCancellationToken_ReplacesOne (line 96) | [Fact]
method WithDocumentAndFieldExpressionAndValue_ReplacesOne (line 122) | [Fact]
method WithDocumentAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 149) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 177) | [Fact]
method WithFilterAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 208) | [Fact]
method WithFilterAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 239) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 272) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 304) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 337) | [Fact]
method WithClientSessionAndDocument_ReplacesOne (line 371) | [Fact]
method WithClientSessionAndDocumentAndCancellationToken_ReplacesOne (line 399) | [Fact]
method WithClientSessionAndDocumentAndUpdateDefinition_ReplacesOne (line 427) | [Fact]
method WithClientSessionAndDocumentAndUpdateDefinitionAndCancellationToken_ReplacesOne (line 454) | [Fact]
method WithClientSessionAndDocumentAndFieldExpressionAndValue_ReplacesOne (line 482) | [Fact]
method WithClientSessionAndDocumentAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 511) | [Fact]
method WithClientSessionAndFilterAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 541) | [Fact]
method WithClientSessionAndFilterAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 575) | [Fact]
method WithClientSessionAndFilterAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 609) | [Fact]
method WithClientSessionAndFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ReplacesOne (line 645) | [Fact]
method WithClientSessionAndFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ReplacesOne (line 680) | [Fact]
method WithClientSessionAndFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ReplacesOne (line 716) | [Fact]
method SetupCollection (line 753) | private Mock<IMongoCollection<TestDocument>> SetupCollection(string pa...
FILE: CoreUnitTests/Infrastructure/FilterDefinitionExtensions.cs
class FilterDefinitionExtensions (line 7) | public static class FilterDefinitionExtensions
method RenderToJson (line 9) | public static string RenderToJson<TDocument>(this FilterDefinition<TDo...
method EquivalentTo (line 12) | public static bool EquivalentTo<TDocument>(this FilterDefinition<TDocu...
FILE: CoreUnitTests/Infrastructure/GenericTestContext.cs
class GenericTestContext (line 7) | public class GenericTestContext<TSut>
method GenericTestContext (line 9) | public GenericTestContext() => Fixture = new Fixture().Customize(new A...
method MockOf (line 11) | protected Mock<T> MockOf<T>()
FILE: CoreUnitTests/Infrastructure/IndexExtensions.cs
class IndexExtensions (line 9) | public static class IndexExtensions
method EqualToJson (line 11) | public static bool EqualToJson<TDocument>(this IndexKeysDefinition<TDo...
method EqualToJson (line 24) | public static bool EqualToJson<TDocument>(this IndexKeysDefinition<TDo...
method EqualTo (line 30) | public static bool EqualTo(this IndexCreationOptions x, CreateIndexOpt...
method EqualTo (line 45) | public static bool EqualTo(this CreateIndexOptions x, IndexCreationOpt...
method RenderIndexModelKeys (line 60) | private static string RenderIndexModelKeys<TDocument>(IndexKeysDefinit...
FILE: CoreUnitTests/Infrastructure/Model/Child.cs
class Child (line 3) | public class Child
method Child (line 5) | public Child(string type, string value)
FILE: CoreUnitTests/Infrastructure/Model/Nested.cs
class Nested (line 7) | public class Nested
FILE: CoreUnitTests/Infrastructure/Model/PartitionedTestDocument.cs
class PartitionedTestDocument (line 5) | public class PartitionedTestDocument : TestDocument, IPartitionedDocument
FILE: CoreUnitTests/Infrastructure/Model/TestDocument.cs
class TestDocument (line 7) | public class TestDocument : Document
method TestDocument (line 9) | public TestDocument()
FILE: CoreUnitTests/Infrastructure/Model/TestDocumentWithKey.cs
class TestDocumentWithKey (line 7) | public class TestDocumentWithKey<TKey> : IDocument<TKey>
method TestDocumentWithKey (line 13) | public TestDocumentWithKey()
FILE: CoreUnitTests/Infrastructure/Model/TestProjection.cs
class TestProjection (line 5) | public class TestProjection
FILE: CoreUnitTests/Infrastructure/TestKeyedMongoRepository.cs
class TestKeyedMongoRepository (line 12) | public class TestKeyedMongoRepository<TKey> : BaseMongoRepository<TKey>
method TestKeyedMongoRepository (line 15) | public TestKeyedMongoRepository(IMongoDatabase mongoDatabase)
method SetIndexHandler (line 20) | public void SetIndexHandler(IMongoDbIndexHandler indexHandler) => Mong...
method SetDbCreator (line 22) | public void SetDbCreator(IMongoDbCreator creator) => MongoDbCreator = ...
method SetReader (line 24) | public void SetReader(IMongoDbReader reader) => MongoDbReader = reader;
method SetEraser (line 26) | public void SetEraser(IMongoDbEraser eraser) => MongoDbEraser = eraser;
method SetUpdater (line 28) | public void SetUpdater(IMongoDbUpdater updater) => MongoDbUpdater = up...
FILE: CoreUnitTests/Infrastructure/TestKeyedMongoRepositoryContext.cs
class TestKeyedMongoRepositoryContext (line 13) | public class TestKeyedMongoRepositoryContext<TKey>
method TestKeyedMongoRepositoryContext (line 20) | protected TestKeyedMongoRepositoryContext()
FILE: CoreUnitTests/Infrastructure/TestKeyedReadOnlyMongoRepository.cs
class TestKeyedReadOnlyMongoRepository (line 8) | public class TestKeyedReadOnlyMongoRepository<TKey> : ReadOnlyMongoRepos...
method TestKeyedReadOnlyMongoRepository (line 12) | public TestKeyedReadOnlyMongoRepository(string connectionString, strin...
method TestKeyedReadOnlyMongoRepository (line 18) | public TestKeyedReadOnlyMongoRepository(IMongoDatabase mongoDatabase)
method TestKeyedReadOnlyMongoRepository (line 24) | public TestKeyedReadOnlyMongoRepository(IMongoDbContext mongoDbContext)
method SetReader (line 29) | public void SetReader(IMongoDbReader reader) => MongoDbReader = reader;
FILE: CoreUnitTests/Infrastructure/TestKeyedReadOnlyMongoRepositoryContext.cs
class TestKeyedReadOnlyMongoRepositoryContext (line 9) | public class TestKeyedReadOnlyMongoRepositoryContext<TKey>
method TestKeyedReadOnlyMongoRepositoryContext (line 16) | protected TestKeyedReadOnlyMongoRepositoryContext()
FILE: CoreUnitTests/Infrastructure/TestMongoRepository.cs
class TestMongoRepository (line 11) | public class TestMongoRepository : BaseMongoRepository
method TestMongoRepository (line 13) | public TestMongoRepository(IMongoDatabase mongoDatabase)
method SetIndexHandler (line 18) | public void SetIndexHandler(IMongoDbIndexHandler indexHandler) => Mong...
method SetDbCreator (line 20) | public void SetDbCreator(IMongoDbCreator creator) => MongoDbCreator = ...
method SetReader (line 22) | public void SetReader(IMongoDbReader reader) => MongoDbReader = reader;
method SetEraser (line 24) | public void SetEraser(IMongoDbEraser eraser) => MongoDbEraser = eraser;
method SetUpdater (line 26) | public void SetUpdater(IMongoDbUpdater updater) => MongoDbUpdater = up...
FILE: CoreUnitTests/Infrastructure/TestMongoRepositoryContext.cs
class TestMongoRepositoryContext (line 12) | public class TestMongoRepositoryContext
method TestMongoRepositoryContext (line 18) | protected TestMongoRepositoryContext()
FILE: CoreUnitTests/Infrastructure/TestReadOnlyMongoRepository.cs
class TestReadOnlyMongoRepository (line 8) | public class TestReadOnlyMongoRepository : ReadOnlyMongoRepository
method TestReadOnlyMongoRepository (line 11) | public TestReadOnlyMongoRepository(string connectionString, string dat...
method TestReadOnlyMongoRepository (line 17) | public TestReadOnlyMongoRepository(IMongoDatabase mongoDatabase)
method TestReadOnlyMongoRepository (line 23) | public TestReadOnlyMongoRepository(IMongoDbContext mongoDbContext)
method SetReader (line 28) | public void SetReader(IMongoDbReader reader) => MongoDbReader = reader;
FILE: CoreUnitTests/Infrastructure/TestReadOnlyMongoRepositoryContext.cs
class TestReadOnlyMongoRepositoryContext (line 10) | public class TestReadOnlyMongoRepositoryContext
method TestReadOnlyMongoRepositoryContext (line 16) | protected TestReadOnlyMongoRepositoryContext()
method MockOf (line 46) | protected Mock<T> MockOf<T>()
FILE: CoreUnitTests/Infrastructure/UpdateDefinitionExtensions.cs
class UpdateDefinitionExtensions (line 7) | public static class UpdateDefinitionExtensions
method EquivalentTo (line 9) | public static bool EquivalentTo<TDocument>(this UpdateDefinition<TDocu...
FILE: CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddManyAsyncTests.cs
class AddManyAsyncTests (line 13) | public class AddManyAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldAddOne (line 15) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 29) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddManyTests.cs
class AddManyTests (line 13) | public class AddManyTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldAddOne (line 15) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 29) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddOneAsyncTests.cs
class AddOneAsyncTests (line 12) | public class AddOneAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldAddOne (line 14) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 28) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddOneTests.cs
class AddOneTests (line 11) | public class AddOneTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldAddOne (line 13) | [Fact]
method WithDocumentAndCancellationToken_ShouldAddOne (line 27) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteManyAsyncTests.cs
class DeleteManyAsyncTests (line 17) | public class DeleteManyAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithDocuments_ShouldDeleteMany (line 19) | [Fact]
method WithDocumentsAndCancellationToken_ShouldDeleteMany (line 39) | [Fact]
method WithFilter_ShouldDeleteMany (line 60) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteMany (line 86) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteMany (line 113) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany (line 140) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteManyTests.cs
class DeleteManyTests (line 16) | public class DeleteManyTests : TestKeyedMongoRepositoryContext<int>
method WithDocuments_ShouldDeleteMany (line 18) | [Fact]
method WithDocumentsAndCancellationToken_ShouldDeleteMany (line 38) | [Fact]
method WithFilter_ShouldDeleteMany (line 60) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteMany (line 83) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteMany (line 111) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteMany (line 139) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteOneAsyncTests.cs
class DeleteOneAsyncTests (line 15) | public class DeleteOneAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldDeleteOne (line 17) | [Fact]
method WithDocumentAndCancellationToken_ShouldDeleteOne (line 37) | [Fact]
method WithFilter_ShouldDeleteOne (line 59) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteOne (line 82) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteOne (line 106) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne (line 130) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteOneTests.cs
class DeleteOneTests (line 14) | public class DeleteOneTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldDeleteOne (line 16) | [Fact]
method WithDocumentAndCancellationToken_ShouldDeleteOne (line 38) | [Fact]
method WithFilter_ShouldDeleteOne (line 61) | [Fact]
method WithFilterAndCancellationToken_ShouldDeleteOne (line 87) | [Fact]
method WithFilterAndPartitionKey_ShouldDeleteOne (line 114) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_ShouldDeleteOne (line 141) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateAscendingIndexAsyncTests.cs
class CreateAscendingIndexAsyncTests (line 15) | public class CreateAscendingIndexAsyncTests : TestKeyedMongoRepositoryCo...
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateCombinedTextIndexAsyncTests.cs
class CreateCombinedTextIndexAsyncTests (line 16) | public class CreateCombinedTextIndexAsyncTests : TestKeyedMongoRepositor...
method WithFieldExpression_CreatesIndex (line 20) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 34) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 49) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 66) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 84) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 100) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 117) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 136) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateDescendingIndexAsyncTests.cs
class CreateDescendingIndexAsyncTests (line 15) | public class CreateDescendingIndexAsyncTests : TestKeyedMongoRepositoryC...
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateHashedIndexAsyncTests.cs
class CreateHashedIndexAsyncTests (line 15) | public class CreateHashedIndexAsyncTests : TestKeyedMongoRepositoryConte...
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateTextIndexAsyncTests.cs
class CreateTextIndexAsyncTests (line 15) | public class CreateTextIndexAsyncTests : TestKeyedMongoRepositoryContext...
method WithFieldExpression_CreatesIndex (line 19) | [Fact]
method WithFieldExpressionAndCancellationToken_CreatesIndex (line 33) | [Fact]
method WithFieldExpressionAndOptions_CreatesIndex (line 48) | [Fact]
method WithFieldExpressionAndOptionsAndCancellationToken_CreatesIndex (line 65) | [Fact]
method WithFieldExpressionAndPartitionKey_CreatesIndex (line 83) | [Fact]
method WithFieldExpressionAndPartitionKeyAndCancellationToken_CreatesIndex (line 99) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKey_CreatesIndex (line 116) | [Fact]
method WithFieldExpressionAndOptionsAndPartitionKeyAndCancellationToken_CreatesIndex (line 135) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/DropIndexAsyncTests.cs
class DropIndexAsyncTests (line 12) | public class DropIndexAsyncTests : TestKeyedMongoRepositoryContext<int>
method WitIndexName_DropsIndex (line 14) | [Fact]
method WitIndexNameAndCancellationToken_DropsIndex (line 29) | [Fact]
method WitIndexNameAndPartitionKey_DropsIndex (line 45) | [Fact]
method WitIndexNameAndPartitionKeyAndCancellationToken_DropsIndex (line 61) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/IndexTests/GetIndexNamesAsyncTests.cs
class GetIndexNamesAsyncTests (line 13) | public class GetIndexNamesAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithNoParameters_ReturnsIndexNames (line 15) | [Fact]
method WithCancellationToken_ReturnsIndexNames (line 35) | [Fact]
method WithPartitionKey_ReturnsIndexNames (line 56) | [Fact]
method WithPartitionKeyAndCancellationToken_ReturnsIndexNames (line 77) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateManyAsyncTests.cs
class UpdateManyAsyncTests (line 16) | public class UpdateManyAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 23) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 55) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 88) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 121) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 155) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 188) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 221) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 254) | [Fact]
method WithFilterExpressionAndUpdateDefinition_ShouldUpdateOne (line 288) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 318) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 349) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 380) | [Fact]
method WithFilterDefinitionAndUpdateDefinition_ShouldUpdateOne (line 411) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionCancellationToken_ShouldUpdateOne (line 441) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 472) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 503) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateManyTests.cs
class UpdateManyTests (line 15) | public class UpdateManyTests : TestKeyedMongoRepositoryContext<int>
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 22) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 54) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 87) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 120) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 154) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 187) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 220) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 253) | [Fact]
method WithFilterExpressionAndUpdateDefinition_ShouldUpdateOne (line 287) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 317) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 348) | [Fact]
method WithFilterExpressionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 379) | [Fact]
method WithFilterDefinitionAndUpdateDefinition_ShouldUpdateOne (line 410) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionCancellationToken_ShouldUpdateOne (line 440) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKey_ShouldUpdateOne (line 471) | [Fact]
method WithFilterDefinitionAndUpdateDefinitionAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 502) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateOneAsyncTests.cs
class UpdateOneAsyncTests (line 16) | public class UpdateOneAsyncTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldUpdateOne (line 23) | [Fact]
method WithDocumentAndCancellationToken_ShouldUpdateOne (line 41) | [Fact]
method WithDocumentAndUpdateDefinition_ShouldUpdateOne (line 60) | [Fact]
method WithDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 87) | [Fact]
method WithDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 115) | [Fact]
method WithDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 145) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 176) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 207) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 239) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 271) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 304) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 336) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 368) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 400) | [Fact]
FILE: CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateOneTests.cs
class UpdateOneTests (line 16) | public class UpdateOneTests : TestKeyedMongoRepositoryContext<int>
method WithDocument_ShouldUpdateOne (line 23) | [Fact]
method WithDocumentAndCancellationToken_ShouldUpdateOne (line 41) | [Fact]
method WithDocumentAndUpdateDefinition_ShouldUpdateOne (line 60) | [Fact]
method WithDocumentAndUpdateDefinitionAndCancellationToken_ShouldUpdateOne (line 87) | [Fact]
method WithDocumentAndFieldExpressionAndValue_ShouldUpdateOne (line 115) | [Fact]
method WithDocumentAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 145) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValue_ShouldUpdateOne (line 176) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 207) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 239) | [Fact]
method WithFilterDefinitionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 271) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValue_ShouldUpdateOne (line 304) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndCancellationToken_ShouldUpdateOne (line 336) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKey_ShouldUpdateOne (line 368) | [Fact]
method WithFilterExpressionAndFieldExpressionAndValueAndPartitionKeyAndCancellationToken_ShouldUpdateOne (line 400) | [Fact]
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/AnyAsyncTests.cs
class AnyAsyncTests (line 15) | public class AnyAsyncTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilter_GetsResult (line 19) | [Fact]
method WithFilterAndCancellationToken_GetsResult (line 35) | [Fact]
method WithFilterAndPartitionKey_GetsResult (line 53) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsResult (line 71) | [Fact]
method SetupReader (line 90) | private void SetupReader()
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/AnyTests.cs
class AnyTests (line 14) | public class AnyTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilter_GetsResult (line 18) | [Fact]
method WithFilterAndCancellationToken_GetsResult (line 34) | [Fact]
method WithFilterAndPartitionKey_GetsResult (line 52) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsResult (line 70) | [Fact]
method SetupReader (line 89) | private void SetupReader()
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/CountAsyncTests.cs
class CountAsyncTests (line 17) | public class CountAsyncTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilter_GetsOne (line 21) | [Fact]
method WithFilterAndCancellationToken_GetsOne (line 39) | [Fact]
method WithFilterAndPartitionKey_GetsOne (line 58) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 77) | [Fact]
method SetupReader (line 97) | private void SetupReader(long count)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/CountTests.cs
class CountTests (line 14) | public class CountTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilter_GetsOne (line 18) | [Fact]
method WithFilterAndCancellationToken_GetsOne (line 36) | [Fact]
method WithFilterAndPartitionKey_GetsOne (line 55) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 74) | [Fact]
method SetupReader (line 94) | private void SetupReader(long count)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetAllAsyncTests.cs
class GetAllAsyncTests (line 17) | public class GetAllAsyncTests : TestKeyedReadOnlyMongoRepositoryContext<...
method WithFilter_GetsOne (line 21) | [Fact]
method WithFilterAndCancellationToken_GetsOne (line 40) | [Fact]
method WithFilterAndPartitionKey_GetsOne (line 60) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 80) | [Fact]
method SetupReader (line 101) | private void SetupReader(List<TestDocumentWithKey<int>> documents)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetAllTests.cs
class GetAllTests (line 16) | public class GetAllTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilter_GetsOne (line 20) | [Fact]
method WithFilterAndCancellationToken_GetsOne (line 39) | [Fact]
method WithFilterAndPartitionKey_GetsOne (line 59) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 79) | [Fact]
method SetupReader (line 100) | private void SetupReader(List<TestDocumentWithKey<int>> documents)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByIdAsyncTests.cs
class GetByIdAsyncTests (line 13) | public class GetByIdAsyncTests : TestKeyedReadOnlyMongoRepositoryContext...
method WithId_Gets (line 15) | [Fact]
method WithIdAndCancellationToken_Gets (line 34) | [Fact]
method WithIdAndPartitionKey_Gets (line 54) | [Fact]
method WithIdAndPartitionKeyAndCancellationToken_Gets (line 74) | [Fact]
method SetupReader (line 95) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByIdTests.cs
class GetByIdTests (line 12) | public class GetByIdTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithId_Gets (line 14) | [Fact]
method WithIdAndCancellationToken_Gets (line 33) | [Fact]
method WithIdAndPartitionKey_Gets (line 53) | [Fact]
method WithIdAndPartitionKeyAndCancellationToken_Gets (line 73) | [Fact]
method SetupReader (line 94) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMaxAsyncTests.cs
class GetByMaxAsyncTests (line 15) | public class GetByMaxAsyncTests : TestKeyedReadOnlyMongoRepositoryContex...
method WithFilterAndSelector_GetsOne (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 59) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 79) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMaxTests.cs
class GetByMaxTests (line 14) | public class GetByMaxTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilterAndSelector_GetsOne (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 78) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMinAsyncTests.cs
class GetByMinAsyncTests (line 15) | public class GetByMinAsyncTests : TestKeyedReadOnlyMongoRepositoryContex...
method WithFilterAndSelector_GetsOne (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 59) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 79) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMinTests.cs
class GetByMinTests (line 14) | public class GetByMinTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilterAndSelector_GetsOne (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 78) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMaxValueAsyncTests.cs
class GetMaxValueAsyncTests (line 15) | public class GetMaxValueAsyncTests : TestKeyedReadOnlyMongoRepositoryCon...
method WithFilterAndSelector_GetsMaxValue (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 57) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 76) | [Fact]
method SetupReader (line 96) | private void SetupReader(int value)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMaxValueTests.cs
class GetMaxValueTests (line 14) | public class GetMaxValueTests : TestKeyedReadOnlyMongoRepositoryContext<...
method WithFilterAndSelector_GetsMaxValue (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 37) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 56) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 75) | [Fact]
method SetupReader (line 95) | private void SetupReader(int value)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMinValueAsyncTests.cs
class GetMinValueAsyncTests (line 15) | public class GetMinValueAsyncTests : TestKeyedReadOnlyMongoRepositoryCon...
method WithFilterAndSelector_GetsMaxValue (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 57) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 76) | [Fact]
method SetupReader (line 96) | private void SetupReader(int value)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMinValueTests.cs
class GetMinValueTests (line 14) | public class GetMinValueTests : TestKeyedReadOnlyMongoRepositoryContext<...
method WithFilterAndSelector_GetsMinValue (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMinValue (line 37) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMinValue (line 56) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMinValue (line 75) | [Fact]
method SetupReader (line 95) | private void SetupReader(int value)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetOneAsyncTests.cs
class GetOneAsyncTests (line 15) | public class GetOneAsyncTests : TestKeyedReadOnlyMongoRepositoryContext<...
method WithFilter_GetsOne (line 19) | [Fact]
method WithFilterAndCancellationToken_GetsOne (line 38) | [Fact]
method WithFilterAndPartitionKey_GetsOne (line 58) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 78) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetOneTests.cs
class GetOneTests (line 14) | public class GetOneTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilter_GetsOne (line 18) | [Fact]
method WithFilterAndCancellationToken_GetsOne (line 37) | [Fact]
method WithFilterAndPartitionKey_GetsOne (line 57) | [Fact]
method WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 77) | [Fact]
method SetupReader (line 98) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetSortedPaginatedAsyncTests.cs
class GetSortedPaginatedAsyncTests (line 18) | public class GetSortedPaginatedAsyncTests : TestKeyedReadOnlyMongoReposi...
method WithFilterAndSortSelector_GetsResults (line 28) | [Fact]
method WithFilterAndSortSelectorAndAscending_GetsResults (line 41) | [Fact]
method WithFilterAndSortSelectorAndSkipNumber_GetsResults (line 55) | [Fact]
method WithFilterAndSortSelectorAndTakeNumber_GetsResults (line 69) | [Fact]
method WithFilterAndSortSelectorAndPartitionKey_GetsResults (line 84) | [Fact]
method WithFilterAndSortSelectorAndCancellationToken_GetsResults (line 98) | [Fact]
method WithFilterAndSortDefinition_GetsResults (line 112) | [Fact]
method WithFilterAndSortDefinitionAndSkipNumber_GetsResults (line 125) | [Fact]
method WithFilterAndSortDefinitionAndTakeNumber_GetsResults (line 139) | [Fact]
method WithFilterAndSortDefinitionAndPartitionKey_GetsResults (line 153) | [Fact]
method WithFilterAndSortDefinitionAndCancellationToken_GetsResults (line 167) | [Fact]
method SetupReaderWithSortSelector (line 181) | private List<TestDocumentWithKey<int>> SetupReaderWithSortSelector()
method VerifySelector (line 199) | private void VerifySelector(List<TestDocumentWithKey<int>> result, Lis...
method SetupReaderWithSortDefinition (line 215) | private List<TestDocumentWithKey<int>> SetupReaderWithSortDefinition()
method VerifyDefinition (line 232) | private void VerifyDefinition(List<TestDocumentWithKey<int>> result, L...
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GroupByTests.cs
class GroupByTests (line 15) | public class GroupByTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithGroupingCriteriaAndProjection_Groups (line 21) | [Fact]
method WithGroupingCriteriaAndProjectionAndCancellationToken_Groups (line 47) | [Fact]
method WithGroupingCriteriaAndProjectionAndPartitionKey_Groups (line 75) | [Fact]
method WithGroupingCriteriaAndProjectionAndPartitionKeyAndCancellationToken_Groups (line 103) | [Fact]
method WithFilterAndGroupingCriteriaAndProjection_Groups (line 132) | [Fact]
method WithFilterAndGroupingCriteriaAndProjectionAndCancellationToken_Groups (line 159) | [Fact]
method WithFilterAndGroupingCriteriaAndProjectionAndPartitionKey_Groups (line 187) | [Fact]
method WithFilterAndGroupingCriteriaAndProjectionAndPartitionKeyAndCancellationToken_Groups (line 215) | [Fact]
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectManyAsyncTests.cs
class ProjectManyAsyncTests (line 17) | public class ProjectManyAsyncTests : TestKeyedReadOnlyMongoRepositoryCon...
method WithFilterAndProjection_Projects (line 22) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 44) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 63) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 82) | [Fact]
method SetupReader (line 102) | private void SetupReader(List<TestProjection> projections)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectManyTests.cs
class ProjectManyTests (line 16) | public class ProjectManyTests : TestKeyedReadOnlyMongoRepositoryContext<...
method WithFilterAndProjection_Projects (line 21) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 43) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 62) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 81) | [Fact]
method SetupReader (line 101) | private void SetupReader(List<TestProjection> projections)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectOneAsyncTests.cs
class ProjectOneAsyncTests (line 15) | public class ProjectOneAsyncTests : TestKeyedReadOnlyMongoRepositoryCont...
method WithFilterAndProjection_Projects (line 20) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 42) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 61) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 80) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestProjection result)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectOneTests.cs
class ProjectOneTests (line 14) | public class ProjectOneTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method WithFilterAndProjection_Projects (line 19) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 41) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 60) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 79) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestProjection result)
FILE: CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/SumByAsyncTests.cs
class SumByAsyncTests (line 15) | public class SumByAsyncTests : TestKeyedReadOnlyMongoRepositoryContext<int>
method Int_WithFilterAndSelector_Sums (line 21) | [Fact]
method Int_WithFilterAndSelectorAndCancellationToken_Sums (line 39) | [Fact]
method Int_WithFilterAndSelectorAndPartitionKey_Sums (line 58) | [Fact]
method Int_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_Sums (line 77) | [Fact]
method Decimal_WithFilterAndSelector_Sums (line 97) | [Fact]
method Decimal_WithFilterAndSelectorAndCancellationToken_Sums (line 115) | [Fact]
method Decimal_WithFilterAndSelectorAndPartitionKey_Sums (line 134) | [Fact]
method Decimal_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_Sums (line 153) | [Fact]
method SetupReaderInt (line 173) | private void SetupReaderInt(int expected)
method SetupReaderDecimal (line 186) | private void SetupReaderDecimal(decimal expected)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/AnyAsyncTests.cs
class AnyAsyncTests (line 16) | public class AnyAsyncTests : TestReadOnlyMongoRepositoryContext
method WithExpression_GetsResult (line 22) | [Fact]
method WithExpressionAndCancellationToken_GetsResult (line 38) | [Fact]
method WithExpressionAndPartitionKey_GetsResult (line 56) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_GetsResult (line 74) | [Fact]
method Keyed_WithExpression_GetsResult (line 95) | [Fact]
method Keyed_WithExpressionAndCancellationToken_GetsResult (line 111) | [Fact]
method Keyed_WithExpressionAndPartitionKey_GetsResult (line 129) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_GetsResult (line 147) | [Fact]
method Keyed_WithFilter_GetsResult (line 166) | [Fact]
method Keyed_WithFilterAndOptions_GetsResult (line 182) | [Fact]
method Keyed_WithFilterAndCancellationToken_GetsResult (line 199) | [Fact]
method Keyed_WithFilterAndOptionsAndCancellationToken_GetsResult (line 217) | [Fact]
method Keyed_WithFilterAndPartitionKey_GetsResult (line 236) | [Fact]
method Keyed_WithFilterAndCountOptionsAndPartitionKey_GetsResult (line 254) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_GetsResult (line 272) | [Fact]
method Keyed_WithFilterAndCountOptionsAndPartitionKeyAndCancellationToken_GetsResult (line 291) | [Fact]
method SetupKeyedReaderWithExpression (line 311) | private void SetupKeyedReaderWithExpression()
method SetupKeyedReaderWithFilter (line 323) | private void SetupKeyedReaderWithFilter()
method SetupReader (line 338) | private void SetupReader()
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/AnyTests.cs
class AnyTests (line 15) | public class AnyTests : TestReadOnlyMongoRepositoryContext
method WithExpression_GetsResult (line 19) | [Fact]
method WithExpressionAndCancellationToken_GetsResult (line 35) | [Fact]
method WithExpressionAndPartitionKey_GetsResult (line 53) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_GetsResult (line 71) | [Fact]
method SetupReader (line 90) | private void SetupReader()
method Keyed_WithExpression_GetsResult (line 107) | [Fact]
method Keyed_WithExpressionAndCancellationToken_GetsResult (line 123) | [Fact]
method Keyed_WithExpressionAndPartitionKey_GetsResult (line 141) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_GetsResult (line 159) | [Fact]
method Keyed_WithFilter_GetsResult (line 178) | [Fact]
method Keyed_WithFilterAndCancellationToken_GetsResult (line 194) | [Fact]
method Keyed_WithFilterAndOptions_GetsResult (line 212) | [Fact]
method Keyed_WithFilterAndOptionsAndCancellationToken_GetsResult (line 229) | [Fact]
method Keyed_WithFilterAndPartitionKey_GetsResult (line 247) | [Fact]
method Keyed_WithFilterAndOptionsAndPartitionKey_GetsResult (line 265) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_GetsResult (line 284) | [Fact]
method Keyed_WithFilterAndOptionsAndPartitionKeyAndCancellationToken_GetsResult (line 303) | [Fact]
method SetupKeyedReaderWithExpression (line 323) | private void SetupKeyedReaderWithExpression()
method SetupKeyedReaderWithFilter (line 335) | private void SetupKeyedReaderWithFilter()
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/CountAsyncTests.cs
class CountAsyncTests (line 16) | public class CountAsyncTests : TestReadOnlyMongoRepositoryContext
method WithExpression_Counts (line 20) | [Fact]
method WithExpressionAndCancellationToken_Counts (line 38) | [Fact]
method WithExpressionAndPartitionKey_Counts (line 57) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_Counts (line 76) | [Fact]
method SetupReader (line 96) | private void SetupReader(long count)
method Keyed_WithExpression_Counts (line 113) | [Fact]
method Keyed_WithExpressionAndCancellationToken_Counts (line 131) | [Fact]
method Keyed_WithExpressionAndPartitionKey_Counts (line 150) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_Counts (line 169) | [Fact]
method Keyed_WithFilter_Counts (line 189) | [Fact]
method Keyed_WithFilterAndCountOptions_Counts (line 207) | [Fact]
method Keyed_WithFilterAndCancellationToken_Counts (line 226) | [Fact]
method Keyed_WithFilterAndCountOptionsAndCancellationToken_Counts (line 245) | [Fact]
method Keyed_WithFilterAndPartitionKey_Counts (line 265) | [Fact]
method Keyed_WithFilterAndCountOptionsAndPartitionKey_Counts (line 284) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_Counts (line 304) | [Fact]
method Keyed_WithFilterAndCountOptionsPartitionKeyAndCancellationToken_Counts (line 324) | [Fact]
method SetupKeyedReaderWithExpression (line 345) | private void SetupKeyedReaderWithExpression(long count)
method SetupKeyedReaderWithFilter (line 357) | private void SetupKeyedReaderWithFilter(long count)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/CountTests.cs
class CountTests (line 15) | public class CountTests : TestReadOnlyMongoRepositoryContext
method WithExpression_Counts (line 19) | [Fact]
method WithExpressionAndCancellationToken_Counts (line 37) | [Fact]
method WithExpressionAndPartitionKey_Counts (line 56) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_Counts (line 75) | [Fact]
method SetupReader (line 95) | private void SetupReader(long count)
method Keyed_WithExpression_Counts (line 115) | [Fact]
method Keyed_WithExpressionAndCancellationToken_Counts (line 133) | [Fact]
method Keyed_WithExpressionAndPartitionKey_Counts (line 152) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_Counts (line 171) | [Fact]
method SetupKeyedReader (line 191) | private void SetupKeyedReader(long count)
method Keyed_WithFilter_Counts (line 203) | [Fact]
method Keyed_WithFilterAndCountOptions_Counts (line 221) | [Fact]
method Keyed_WithFilterAndCancellationToken_Counts (line 240) | [Fact]
method Keyed_WithFilterAndCountOptionsAndCancellationToken_Counts (line 259) | [Fact]
method Keyed_WithFilterAndPartitionKey_Counts (line 279) | [Fact]
method Keyed_WithFilterAndCountOptionsAndPartitionKey_Counts (line 298) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_Counts (line 318) | [Fact]
method Keyed_WithFilterAndCountOptionsAndPartitionKeyAndCancellationToken_Counts (line 338) | [Fact]
method SetupKeyedReaderWithFilter (line 359) | private void SetupKeyedReaderWithFilter(long count)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetAllAsyncTests.cs
class GetAllAsyncTests (line 18) | public class GetAllAsyncTests : TestReadOnlyMongoRepositoryContext
method WithExpression_GetsAll (line 22) | [Fact]
method WithExpressionAndCancellationToken_GetsAll (line 41) | [Fact]
method WithExpressionAndPartitionKey_GetsAll (line 61) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_GetsAll (line 81) | [Fact]
method SetupReader (line 102) | private void SetupReader(List<TestDocument> documents)
method Keyed_WithExpression_GetsAll (line 119) | [Fact]
method Keyed_WithExpressionAndCancellationToken_GetsAll (line 138) | [Fact]
method Keyed_WithExpressionAndPartitionKey_GetsAll (line 158) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_GetsAll (line 178) | [Fact]
method Keyed_WithFilter_GetsAll (line 199) | [Fact]
method Keyed_WithFilterAndOptions_GetsAll (line 218) | [Fact]
method Keyed_WithFilterAndCancellationToken_GetsAll (line 238) | [Fact]
method Keyed_WithFilterAndFindOptionsAndCancellationToken_GetsAll (line 258) | [Fact]
method Keyed_WithFilterAndPartitionKey_GetsAll (line 279) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKey_GetsAll (line 299) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_GetsAll (line 320) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKeyAndCancellationToken_GetsAll (line 341) | [Fact]
method SetupReaderWithFilter (line 363) | private void SetupReaderWithFilter(List<TestDocumentWithKey<int>> docu...
method SetupReader (line 376) | private void SetupReader(List<TestDocumentWithKey<int>> documents)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetAllTests.cs
class GetAllTests (line 17) | public class GetAllTests : TestReadOnlyMongoRepositoryContext
method WithExpression_GetsAll (line 21) | [Fact]
method WithExpressionAndCancellationToken_GetsAll (line 40) | [Fact]
method WithExpressionAndPartitionKey_GetsAll (line 60) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_GetsAll (line 80) | [Fact]
method SetupReader (line 101) | private void SetupReader(List<TestDocument> documents)
method Keyed_WithExpression_GetsAll (line 118) | [Fact]
method Keyed_WithExpressionAndCancellationToken_GetsAll (line 137) | [Fact]
method Keyed_WithExpressionAndPartitionKey_GetsAll (line 157) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_GetsAll (line 177) | [Fact]
method Keyed_WithFilter_GetsAll (line 198) | [Fact]
method Keyed_WithFilterAndFindOptions_GetsAll (line 217) | [Fact]
method Keyed_WithFilterAndCancellationToken_GetsAll (line 237) | [Fact]
method Keyed_WithFilterAndFindOptionsAndCancellationToken_GetsAll (line 257) | [Fact]
method Keyed_WithFilterAndPartitionKey_GetsAll (line 278) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKey_GetsAll (line 298) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_GetsAll (line 319) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKeyAndCancellationToken_GetsAll (line 340) | [Fact]
method SetupKeyedReaderWithFilter (line 362) | private void SetupKeyedReaderWithFilter(List<TestDocumentWithKey<int>>...
method SetupKeyedReader (line 375) | private void SetupKeyedReader(List<TestDocumentWithKey<int>> documents)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByIdAsyncTests.cs
class GetByIdAsyncTests (line 14) | public class GetByIdAsyncTests : TestReadOnlyMongoRepositoryContext
method WithId_Gets (line 16) | [Fact]
method WithIdAndCancellationToken_Gets (line 35) | [Fact]
method WithIdAndPartitionKey_Gets (line 55) | [Fact]
method WithIdAndPartitionKeyAndCancellationToken_Gets (line 75) | [Fact]
method SetupReader (line 96) | private void SetupReader(TestDocument document)
method Keyed_WithId_Gets (line 110) | [Fact]
method Keyed_WithIdAndCancellationToken_Gets (line 129) | [Fact]
method Keyed_WithIdAndPartitionKey_Gets (line 149) | [Fact]
method Keyed_WithIdAndPartitionKeyAndCancellationToken_Gets (line 169) | [Fact]
method SetupKeyedReader (line 190) | private void SetupKeyedReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByIdTests.cs
class GetByIdTests (line 13) | public class GetByIdTests : TestReadOnlyMongoRepositoryContext
method WithId_Gets (line 15) | [Fact]
method WithIdAndCancellationToken_Gets (line 34) | [Fact]
method WithIdAndPartitionKey_Gets (line 54) | [Fact]
method WithIdAndPartitionKeyAndCancellationToken_Gets (line 74) | [Fact]
method SetupReader (line 95) | private void SetupReader(TestDocument document)
method Keyed_WithId_Gets (line 109) | [Fact]
method Keyed_WithIdAndCancellationToken_Gets (line 128) | [Fact]
method Keyed_WithIdAndPartitionKey_Gets (line 148) | [Fact]
method Keyed_WithIdAndPartitionKeyAndCancellationToken_Gets (line 168) | [Fact]
method SetupKeyedReader (line 189) | private void SetupKeyedReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMaxAsyncTests.cs
class GetByMaxAsyncTests (line 15) | public class GetByMaxAsyncTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsOne (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 59) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 79) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestDocument document)
method Keyed_WithFilterAndSelector_GetsOne (line 118) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsOne (line 137) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsOne (line 157) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 177) | [Fact]
method SetupReader (line 198) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMaxTests.cs
class GetByMaxTests (line 14) | public class GetByMaxTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsOne (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 78) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestDocument document)
method Keyed_WithFilterAndSelector_GetsOne (line 117) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsOne (line 136) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsOne (line 156) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 176) | [Fact]
method SetupReader (line 197) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMinAsyncTests.cs
class GetByMinAsyncTests (line 15) | public class GetByMinAsyncTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsOne (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 39) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 59) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 79) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestDocument document)
method Keyed_WithFilterAndSelector_GetsOne (line 118) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsOne (line 137) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsOne (line 157) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 177) | [Fact]
method SetupKeyedReader (line 198) | private void SetupKeyedReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMinTests.cs
class GetByMinTests (line 14) | public class GetByMinTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsOne (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsOne (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsOne (line 58) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 78) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestDocument document)
method Keyed_WithFilterAndSelector_GetsOne (line 117) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsOne (line 136) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsOne (line 156) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsOne (line 176) | [Fact]
method SetupReader (line 197) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMaxValueAsyncTests.cs
class GetMaxValueAsyncTests (line 15) | public class GetMaxValueAsyncTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsMaxValue (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 57) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 76) | [Fact]
method SetupReader (line 96) | private void SetupReader(int value)
method Keyed_WithFilterAndSelector_GetsMaxValue (line 114) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 132) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 151) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 170) | [Fact]
method SetupKeyedReader (line 190) | private void SetupKeyedReader(int value)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMaxValueTests.cs
class GetMaxValueTests (line 14) | public class GetMaxValueTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsMaxValue (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 37) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 56) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 75) | [Fact]
method SetupReader (line 95) | private void SetupReader(int value)
method Keyed_WithFilterAndSelector_GetsMaxValue (line 113) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 131) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 150) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 169) | [Fact]
method SetupKeyedReader (line 189) | private void SetupKeyedReader(int value)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMinValueAsyncTests.cs
class GetMinValueAsyncTests (line 15) | public class GetMinValueAsyncTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsMaxValue (line 20) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 38) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 57) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 76) | [Fact]
method SetupReader (line 96) | private void SetupReader(int value)
method Keyed_WithFilterAndSelector_GetsMaxValue (line 114) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsMaxValue (line 132) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsMaxValue (line 151) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMaxValue (line 170) | [Fact]
method SetupKeyedReader (line 190) | private void SetupKeyedReader(int value)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMinValueTests.cs
class GetMinValueTests (line 14) | public class GetMinValueTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndSelector_GetsMinValue (line 19) | [Fact]
method WithFilterAndSelectorAndCancellationToken_GetsMinValue (line 37) | [Fact]
method WithFilterAndSelectorAndPartitionKey_GetsMinValue (line 56) | [Fact]
method WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMinValue (line 75) | [Fact]
method SetupReader (line 95) | private void SetupReader(int value)
method Keyed_WithFilterAndSelector_GetsMinValue (line 113) | [Fact]
method Keyed_WithFilterAndSelectorAndCancellationToken_GetsMinValue (line 131) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKey_GetsMinValue (line 150) | [Fact]
method Keyed_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_GetsMinValue (line 169) | [Fact]
method SetupKeyedReader (line 189) | private void SetupKeyedReader(int value)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetOneAsyncTests.cs
class GetOneAsyncTests (line 16) | public class GetOneAsyncTests : TestReadOnlyMongoRepositoryContext
method WithExpression_GetsOne (line 20) | [Fact]
method WithExpressionAndCancellationToken_GetsOne (line 39) | [Fact]
method WithExpressionAndPartitionKey_GetsOne (line 59) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_GetsOne (line 79) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestDocument document)
method Keyed_WithExpression_GetsOne (line 117) | [Fact]
method Keyed_WithExpressionAndCancellationToken_GetsOne (line 136) | [Fact]
method Keyed_WithExpressionAndPartitionKey_GetsOne (line 156) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_GetsOne (line 176) | [Fact]
method Keyed_WithFilter_GetsOne (line 197) | [Fact]
method Keyed_WithFilterAndFindOptions_GetsOne (line 216) | [Fact]
method Keyed_WithFilterAndCancellationToken_GetsOne (line 236) | [Fact]
method Keyed_WithFilterAndFindOptionsAndCancellationToken_GetsOne (line 256) | [Fact]
method Keyed_WithFilterAndPartitionKey_GetsOne (line 277) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKey_GetsOne (line 297) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 318) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKeyAndCancellationToken_GetsOne (line 339) | [Fact]
method SetupKeyedReaderWithFilter (line 361) | private void SetupKeyedReaderWithFilter(TestDocumentWithKey<int> docum...
method SetupReader (line 374) | private void SetupReader(TestDocumentWithKey<int> document)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetOneTests.cs
class GetOneTests (line 15) | public class GetOneTests : TestReadOnlyMongoRepositoryContext
method WithExpression_GetsOne (line 19) | [Fact]
method WithExpressionAndCancellationToken_GetsOne (line 38) | [Fact]
method WithExpressionAndPartitionKey_GetsOne (line 58) | [Fact]
method WithExpressionAndPartitionKeyAndCancellationToken_GetsOne (line 78) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestDocument document)
method Keyed_WithExpression_GetsOne (line 116) | [Fact]
method Keyed_WithExpressionAndCancellationToken_GetsOne (line 135) | [Fact]
method Keyed_WithExpressionAndPartitionKey_GetsOne (line 155) | [Fact]
method Keyed_WithExpressionAndPartitionKeyAndCancellationToken_GetsOne (line 175) | [Fact]
method Keyed_WithFilter_GetsOne (line 196) | [Fact]
method Keyed_WithFilterAndFindOptions_GetsOne (line 215) | [Fact]
method Keyed_WithFilterAndCancellationToken_GetsOne (line 235) | [Fact]
method Keyed_WithFilterAndFindOptionsAndCancellationToken_GetsOne (line 255) | [Fact]
method Keyed_WithFilterAndPartitionKey_GetsOne (line 276) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKey_GetsOne (line 296) | [Fact]
method Keyed_WithFilterAndPartitionKeyAndCancellationToken_GetsOne (line 317) | [Fact]
method Keyed_WithFilterAndFindOptionsAndPartitionKeyAndCancellationToken_GetsOne (line 338) | [Fact]
method SetupKeyedReader (line 360) | private void SetupKeyedReader(TestDocumentWithKey<int> document)
method SetupKeyedReaderWithFilter (line 372) | private void SetupKeyedReaderWithFilter(TestDocumentWithKey<int> docum...
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GetSortedPaginatedAsyncTests.cs
class GetSortedPaginatedAsyncTests (line 18) | public class GetSortedPaginatedAsyncTests : TestReadOnlyMongoRepositoryC...
method WithFilterAndSortSelector_GetsResults (line 28) | [Fact]
method WithFilterAndSortSelectorAndAscending_GetsResults (line 41) | [Fact]
method WithFilterAndSortSelectorAndSkipNumber_GetsResults (line 55) | [Fact]
method WithFilterAndSortSelectorAndTakeNumber_GetsResults (line 69) | [Fact]
method WithFilterAndSortSelectorAndPartitionKey_GetsResults (line 84) | [Fact]
method WithFilterAndSortSelectorAndCancellationToken_GetsResults (line 98) | [Fact]
method WithFilterAndSortDefinition_GetsResults (line 112) | [Fact]
method WithFilterAndSortDefinitionAndSkipNumber_GetsResults (line 125) | [Fact]
method WithFilterAndSortDefinitionAndTakeNumber_GetsResults (line 139) | [Fact]
method WithFilterAndSortDefinitionAndPartitionKey_GetsResults (line 153) | [Fact]
method WithFilterAndSortDefinitionAndCancellationToken_GetsResults (line 167) | [Fact]
method SetupReaderWithSortSelector (line 181) | private List<TestDocument> SetupReaderWithSortSelector()
method VerifySelector (line 199) | private void VerifySelector(List<TestDocument> result, List<TestDocume...
method SetupReaderWithSortDefinition (line 215) | private List<TestDocument> SetupReaderWithSortDefinition()
method VerifyDefinition (line 232) | private void VerifyDefinition(List<TestDocument> result, List<TestDocu...
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/GroupByTests.cs
class GroupByTests (line 15) | public class GroupByTests : TestReadOnlyMongoRepositoryContext
method WithGroupingCriteriaAndProjection_Groups (line 21) | [Fact]
method WithGroupingCriteriaAndProjectionAndCancellationToken_Groups (line 47) | [Fact]
method WithGroupingCriteriaAndProjectionAndPartitionKey_Groups (line 75) | [Fact]
method WithGroupingCriteriaAndProjectionAndPartitionKeyAndCancellationToken_Groups (line 103) | [Fact]
method WithFilterAndGroupingCriteriaAndProjection_Groups (line 132) | [Fact]
method WithFilterAndGroupingCriteriaAndProjectionAndCancellationToken_Groups (line 159) | [Fact]
method WithFilterAndGroupingCriteriaAndProjectionAndPartitionKey_Groups (line 187) | [Fact]
method WithFilterAndGroupingCriteriaAndProjectionAndPartitionKeyAndCancellationToken_Groups (line 215) | [Fact]
method Keyed_WithGroupingCriteriaAndProjection_Groups (line 250) | [Fact]
method Keyed_WithGroupingCriteriaAndProjectionAndCancellationToken_Groups (line 276) | [Fact]
method Keyed_WithGroupingCriteriaAndProjectionAndPartitionKey_Groups (line 304) | [Fact]
method Keyed_WithGroupingCriteriaAndProjectionAndPartitionKeyAndCancellationToken_Groups (line 332) | [Fact]
method Keyed_WithFilterAndGroupingCriteriaAndProjection_Groups (line 361) | [Fact]
method Keyed_WithFilterAndGroupingCriteriaAndProjectionAndCancellationToken_Groups (line 388) | [Fact]
method Keyed_WithFilterAndGroupingCriteriaAndProjectionAndPartitionKey_Groups (line 416) | [Fact]
method Keyed_WithFilterAndGroupingCriteriaAndProjectionAndPartitionKeyAndCancellationToken_Groups (line 444) | [Fact]
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectManyAsyncTests.cs
class ProjectManyAsyncTests (line 17) | public class ProjectManyAsyncTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndProjection_Projects (line 22) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 44) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 63) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 82) | [Fact]
method SetupReader (line 102) | private void SetupReader(List<TestProjection> projections)
method Keyed_WithFilterAndProjection_Projects (line 120) | [Fact]
method Keyed_WithFilterAndProjectionAndCancellationToken_Projects (line 142) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKey_Projects (line 161) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 180) | [Fact]
method SetupKeyedReader (line 200) | private void SetupKeyedReader(List<TestProjection> keyedProjections)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectManyTests.cs
class ProjectManyTests (line 16) | public class ProjectManyTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndProjection_Projects (line 21) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 43) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 62) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 81) | [Fact]
method SetupReader (line 101) | private void SetupReader(List<TestProjection> projections)
method Keyed_WithFilterAndProjection_Projects (line 119) | [Fact]
method Keyed_WithFilterAndProjectionAndCancellationToken_Projects (line 141) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKey_Projects (line 160) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 179) | [Fact]
method SetupKeyedReader (line 199) | private void SetupKeyedReader(List<TestProjection> keyedProjections)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectOneAsyncTests.cs
class ProjectOneAsyncTests (line 15) | public class ProjectOneAsyncTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndProjection_Projects (line 20) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 42) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 61) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 80) | [Fact]
method SetupReader (line 100) | private void SetupReader(TestProjection result)
method Keyed_WithFilterAndProjection_Projects (line 118) | [Fact]
method Keyed_WithFilterAndProjectionAndCancellationToken_Projects (line 140) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKey_Projects (line 159) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 178) | [Fact]
method SetupKeyedReader (line 198) | private void SetupKeyedReader(TestProjection result)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectOneTests.cs
class ProjectOneTests (line 14) | public class ProjectOneTests : TestReadOnlyMongoRepositoryContext
method WithFilterAndProjection_Projects (line 19) | [Fact]
method WithFilterAndProjectionAndCancellationToken_Projects (line 41) | [Fact]
method WithFilterAndProjectionAndPartitionKey_Projects (line 60) | [Fact]
method WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 79) | [Fact]
method SetupReader (line 99) | private void SetupReader(TestProjection result)
method Keyed_WithFilterAndProjection_Projects (line 117) | [Fact]
method Keyed_WithFilterAndProjectionAndCancellationToken_Projects (line 139) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKey_Projects (line 158) | [Fact]
method Keyed_WithFilterAndProjectionAndPartitionKeyAndCancellationToken_Projects (line 177) | [Fact]
method SetupKeyedReader (line 197) | private void SetupKeyedReader(TestProjection result)
FILE: CoreUnitTests/ReadOnlyMongoRepositoryTests/SumByAsyncTests.cs
class SumByAsyncTests (line 15) | public class SumByAsyncTests : TestReadOnlyMongoRepositoryContext
method Int_WithFilterAndSelector_Sums (line 21) | [Fact]
method Int_WithFilterAndSelectorAndCancellationToken_Sums (line 39) | [Fact]
method Int_WithFilterAndSelectorAndPartitionKey_Sums (line 58) | [Fact]
method Int_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_Sums (line 77) | [Fact]
method Decimal_WithFilterAndSelector_Sums (line 97) | [Fact]
method Decimal_WithFilterAndSelectorAndCancellationToken_Sums (line 115) | [Fact]
method Decimal_WithFilterAndSelectorAndPartitionKey_Sums (line 134) | [Fact]
method Decimal_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_Sums (line 153) | [Fact]
method SetupReaderInt (line 173) | private void SetupReaderInt(int expected)
method SetupReaderDecimal (line 186) | private void SetupReaderDecimal(decimal expected)
method Keyed_Int_WithFilterAndSelector_Sums (line 205) | [Fact]
method Keyed_Int_WithFilterAndSelectorAndCancellationToken_Sums (line 223) | [Fact]
method Keyed_Int_WithFilterAndSelectorAndPartitionKey_Sums (line 242) | [Fact]
method Keyed_Int_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_Sums (line 261) | [Fact]
method Keyed_Decimal_WithFilterAndSelector_Sums (line 281) | [Fact]
method Keyed_Decimal_WithFilterAndSelectorAndCancellationToken_Sums (line 299) | [Fact]
method Keyed_Decimal_WithFilterAndSelectorAndPartitionKey_Sums (line 318) | [Fact]
method Keyed_Decimal_WithFilterAndSelectorAndPartitionKeyAndCancellationToken_Sums (line 337) | [Fact]
method SetupKeyedReaderInt (line 357) | private void SetupKeyedReaderInt(int expected)
method SetupKeyedReaderDecimal (line 370) | private void SetupKeyedReaderDecimal(decimal expected)
FILE: IntegrationTests/CRUDObjectIdTests.cs
class ObjectIdTestDocument (line 7) | public class ObjectIdTestDocument : TestDoc<ObjectId>
class CRUDObjectIdTests (line 11) | [TestFixture]
method GetClassName (line 14) | public override string GetClassName()
FILE: IntegrationTests/CRUDPartitionedCollectionNameAttributeTests.cs
class PartitionedCollectionNameDoc (line 9) | [CollectionName("TestingCollectionNameAttributePartitionedTKey")]
method PartitionedCollectionNameDoc (line 12) | public PartitionedCollectionNameDoc()
class CRUDPartitionedCollectionNameAttributeTests (line 20) | public class CRUDPartitionedCollectionNameAttributeTests : MongoDbDocume...
method GetClassName (line 22) | public override string GetClassName()
FILE: IntegrationTests/CRUDPartitionedTests.cs
class PartitionedDoc (line 6) | public class PartitionedDoc : TestDoc, IPartitionedDocument
method PartitionedDoc (line 8) | public PartitionedDoc()
class CRUDPartitionedTests (line 16) | public class CRUDPartitionedTests : MongoDbDocumentTestBase<PartitionedDoc>
method GetClassName (line 18) | public override string GetClassName()
FILE: IntegrationTests/CRUDTKeyPartitionedCollectionNameAttributeTests.cs
class TKeyPartitionedCollectionNameDoc (line 8) | [CollectionName("TestingCollectionNameAttributePartitionedTKey")]
method TKeyPartitionedCollectionNameDoc (line 11) | public TKeyPartitionedCollectionNameDoc()
class CRUDTKeyPartitionedCollectionNameAttributeTests (line 19) | public class CRUDTKeyPartitionedCollectionNameAttributeTests : MongoDbTK...
method GetClassName (line 21) | public override string GetClassName()
FILE: IntegrationTests/CRUDTKeyPartitionedTests.cs
class PartitionedTKeyTestDocument (line 9) | public class PartitionedTKeyTestDocument : TestDoc<Guid>, IPartitionedDo...
method PartitionedTKeyTestDocument (line 11) | public PartitionedTKeyTestDocument()
class CRUDTKeyPartitionedTests (line 18) | [TestFixture]
method GetClassName (line 21) | public override string GetClassName()
FILE: IntegrationTests/CRUDTKeyTests.cs
class TKeyTestDocument (line 9) | public class TKeyTestDocument : TestDoc<Guid>
class CRUDTKeyTests (line 13) | [TestFixture]
method GetClassName (line 16) | public override string GetClassName()
FILE: IntegrationTests/CRUDTests.cs
class TestDocument (line 6) | public class TestDocument : TestDoc
class CRUDTests (line 10) | [TestFixture]
method GetClassName (line 13) | public override string GetClassName()
FILE: IntegrationTests/Infrastructure/BaseMongoDbRepositoryTests.cs
class BaseMongoDbRepositoryTests (line 8) | public class BaseMongoDbRepositoryTests<T> where T : class, new()
method CreateTestDocument (line 10) | public T CreateTestDocument()
method CreateTestDocuments (line 15) | public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
method BaseMongoDbRepositoryTests (line 25) | public BaseMongoDbRepositoryTests()
method Init (line 41) | [OneTimeSetUp]
method Cleanup (line 48) | [OneTimeTearDown]
FILE: IntegrationTests/Infrastructure/GlobalVariables.cs
class GlobalVariables (line 8) | public static class GlobalVariables
FILE: IntegrationTests/Infrastructure/ITestRepository.cs
type ITestRepository (line 5) | public interface ITestRepository : IBaseMongoRepository
method DropTestCollection (line 7) | void DropTestCollection<TDocument>();
method DropTestCollection (line 8) | void DropTestCollection<TDocument>(string partitionKey);
FILE: IntegrationTests/Infrastructure/MongoDBDocumentTestBase.cs
class MongoDbDocumentTestBase (line 13) | [TestFixture]
method CreateTestDocument (line 17) | public T CreateTestDocument()
method GetClassName (line 22) | public abstract string GetClassName();
method CreateTestDocuments (line 24) | public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
method MongoDbDocumentTestBase (line 54) | public MongoDbDocumentTestBase()
method Init (line 65) | [OneTimeSetUp]
method Cleanup (line 72) | [OneTimeTearDown]
method AddOne (line 88) | [Test]
method AddOneAsync (line 101) | [Test]
method AddMany (line 114) | [Test]
method AddManyAsync (line 129) | [Test]
method GetByIdAsync (line 149) | [Test]
method GetById (line 161) | [Test]
method GetOneAsync (line 173) | [Test]
method GetOne (line 185) | [Test]
method GetCursor (line 197) | [Test]
method AnyAsyncReturnsTrue (line 210) | [Test]
method AnyAsyncReturnsFalse (line 222) | [Test]
method AnyReturnsTrue (line 234) | [Test]
method AnyReturnsFalse (line 246) | [Test]
method GetAllAsync (line 258) | [Test]
method GetAll (line 272) | [Test]
method CountAsync (line 286) | [Test]
method Count (line 300) | [Test]
method UpdateOne (line 318) | [Test]
method UpdateOneAsync (line 335) | [Test]
method UpdateOneField (line 352) | [Test]
method UpdateOneFieldAsync (line 368) | [Test]
method UpdateOneFieldWithFilter (line 384) | [Test]
method UpdateOneFieldWithFilterAsync (line 400) | [Test]
method UpdateOneAsyncWithUpdateDefinition (line 416) | [Test]
method UpdateOneWithUpdateDefinition (line 442) | [Test]
method DeleteOne (line 472) | [Test]
method DeleteOneLinq (line 485) | [Test]
method DeleteOneAsync (line 498) | [Test]
method DeleteOneAsyncLinq (line 511) | [Test]
method DeleteManyAsyncLinq (line 524) | [Test]
method DeleteManyAsync (line 539) | [Test]
method DeleteManyLinq (line 554) | [Test]
method DeleteMany (line 569) | [Test]
method ProjectOneAsync (line 588) | [Test]
method ProjectOne (line 614) | [Test]
method ProjectManyAsync (line 640) | [Test]
method ProjectMany (line 670) | [Test]
method GroupByTProjection (line 704) | [Test]
method FilteredGroupByTProjection (line 740) | [Test]
method GetCurrentMethod (line 789) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetParentMethod (line 798) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetTestName (line 807) | private string GetTestName()
method GetContent (line 812) | private string GetContent()
FILE: IntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.cs
class MongoDbTKeyDocumentTestBase (line 13) | [TestFixture]
method CreateTestDocument (line 18) | public T CreateTestDocument()
method GetClassName (line 23) | public abstract string GetClassName();
method CreateTestDocuments (line 25) | public List<T> CreateTestDocuments(int numberOfDocumentsToCreate)
method MongoDbTKeyDocumentTestBase (line 55) | public MongoDbTKeyDocumentTestBase()
method Init (line 66) | [OneTimeSetUp]
method Cleanup (line 73) | [OneTimeTearDown]
method AddOne (line 89) | [Test]
method AddOneAsync (line 102) | [Test]
method AddMany (line 115) | [Test]
method AddManyAsync (line 130) | [Test]
method GetByIdAsync (line 150) | [Test]
method GetById (line 162) | [Test]
method GetOneAsync (line 174) | [Test]
method GetOne (line 186) | [Test]
method GetCursor (line 198) | [Test]
method AnyAsyncReturnsTrue (line 211) | [Test]
method AnyAsyncReturnsFalse (line 223) | [Test]
method AnyReturnsTrue (line 235) | [Test]
method AnyReturnsFalse (line 247) | [Test]
method GetAllAsync (line 259) | [Test]
method GetAll (line 273) | [Test]
method CountAsync (line 287) | [Test]
method Count (line 301) | [Test]
method UpdateOne (line 319) | [Test]
method UpdateOneAsync (line 336) | [Test]
method UpdateOneField (line 353) | [Test]
method UpdateOneFieldAsync (line 369) | [Test]
method UpdateOneFieldWithFilter (line 385) | [Test]
method UpdateOneFieldWithFilterAsync (line 401) | [Test]
method UpdateOneAsyncWithUpdateDefinition (line 417) | [Test]
method UpdateOneWithUpdateDefinition (line 443) | [Test]
method DeleteOne (line 473) | [Test]
method DeleteOneLinq (line 486) | [Test]
method DeleteOneAsync (line 499) | [Test]
method DeleteOneAsyncLinq (line 512) | [Test]
method DeleteManyAsyncLinq (line 525) | [Test]
method DeleteManyAsync (line 540) | [Test]
method DeleteManyLinq (line 555) | [Test]
method DeleteMany (line 570) | [Test]
method ProjectOneAsync (line 589) | [Test]
method ProjectOne (line 615) | [Test]
method ProjectManyAsync (line 641) | [Test]
method ProjectMany (line 671) | [Test]
method GetCurrentMethod (line 704) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetParentMethod (line 713) | [MethodImpl(MethodImplOptions.NoInlining)]
method GetTestName (line 722) | private string GetTestName()
method GetContent (line 727) | private string GetContent()
FILE: IntegrationTests/Infrastructure/RandomExtensions.cs
class RandomExtensions (line 9) | public static class RandomExtensions
method NextLong (line 18) | public static long NextLong(this Random random, long min, long max)
method NextLong (line 46) | public static long NextLong(this Random random, long max)
method NextLong (line 56) | public static long NextLong(this Random random)
FILE: IntegrationTests/Infrastructure/TestClasses.cs
class ProjectedGroup (line 9) | public class ProjectedGroup
class MyTestProjection (line 15) | public class MyTestProjection
class Nested (line 21) | public class Nested
class Child (line 26) | public class Child
method Child (line 28) | public Child(string type, string value)
class TestDoc (line 38) | public class TestDoc : Document
method TestDoc (line 40) | public TestDoc()
method TestDoc (line 67) | public TestDoc()
method Init (line 84) | public TId Init<TId>()
method InitializeFields (line 89) | private void InitializeFields()
class TestDoc (line 60) | public class TestDoc<TKey> : IDocument<TKey>
method TestDoc (line 40) | public TestDoc()
method TestDoc (line 67) | public TestDoc()
method Init (line 84) | public TId Init<TId>()
method InitializeFields (line 89) | private void InitializeFields()
FILE: IntegrationTests/Infrastructure/TestRepository.cs
class TestRepository (line 10) | public class TestRepository : BaseMongoRepository, ITestRepository
method TestRepository (line 13) | public TestRepository(string connectionString, string databaseName) : ...
method DropTestCollection (line 17) | public void DropTestCollection<TDocument>()
method DropTestCollection (line 22) | public void DropTestCollection<TDocument>(string partitionKey)
FILE: MongoDbGenericRepository/Abstractions/IBaseMongoRepository.cs
type IBaseMongoRepository (line 14) | public interface IBaseMongoRepository :
method GetPaginatedAsync (line 30) | Task<List<TDocument>> GetPaginatedAsync<TDocument>(
method GetPaginatedAsync (line 48) | Task<List<TDocument>> GetPaginatedAsync<TDocument, TKey>(
method GetAndUpdateOne (line 65) | Task<TDocument> GetAndUpdateOne<TDocument>(
method GetAndUpdateOne (line 80) | Task<TDocument> GetAndUpdateOne<TDocument>(
method GetAndUpdateOne (line 96) | Task<TDocument> GetAndUpdateOne<TDocument, TKey>(
method GetAndUpdateOne (line 113) | Task<TDocument> GetAndUpdateOne<TDocument, TKey>(
FILE: MongoDbGenericRepository/Abstractions/IBaseMongoRepository_Update.cs
type IBaseMongoRepository_Update (line 13) | public interface IBaseMongoRepository_Update : IBaseMongoRepository_Upda...
method UpdateOneAsync (line 21) | Task<bool> UpdateOneAsync<TDocument, TKey>(TDocument modifiedDocument)
method UpdateOneAsync (line 32) | Task<bool> UpdateOneAsync<TDocument, TKey>(TDocument modifiedDocument,...
method UpdateOne (line 42) | bool UpdateOne<TDocument, TKey>(TDocument modifiedDocument)
method UpdateOne (line 53) | bool UpdateOne<TDocument, TKey>(TDocument modifiedDocument, Cancellati...
method UpdateOneAsync (line 64) | Task<bool> UpdateOneAsync<TDocument, TKey>(TDocument documentToModify,...
method UpdateOneAsync (line 76) | Task<bool> UpdateOneAsync<TDocument, TKey>(TDocument documentToModify,...
method UpdateOne (line 87) | bool UpdateOne<TDocument, TKey>(TDocument documentToModify, UpdateDefi...
method UpdateOne (line 99) | bool UpdateOne<TDocument, TKey>(TDocument documentToModify, UpdateDefi...
method UpdateOne (line 112) | bool UpdateOne<TDocument, TKey, TField>(Expression<Func<TDocument, boo...
method UpdateOne (line 126) | bool UpdateOne<TDocument, TKey, TField>(Expression<Func<TDocument, boo...
method UpdateOne (line 140) | bool UpdateOne<TDocument, TKey, TField>(Expression<Func<TDocument, boo...
method UpdateOne (line 155) | bool UpdateOne<TDocument, TKey, TField>(Expression<Func<TDocument, boo...
method UpdateOneAsync (line 168) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(TDocument documentT...
method UpdateOneAsync (line 182) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(TDocument documentT...
method UpdateOneAsync (line 195) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(Expression<Func<TDo...
method UpdateOneAsync (line 209) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(Expression<Func<TDo...
method UpdateOneAsync (line 223) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(Expression<Func<TDo...
method UpdateOneAsync (line 238) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(Expression<Func<TDo...
method UpdateOne (line 251) | bool UpdateOne<TDocument, TKey, TField>(TDocument documentToModify, Ex...
method UpdateOne (line 265) | bool UpdateOne<TDocument, TKey, TField>(TDocument documentToModify, Ex...
method UpdateOneAsync (line 278) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(FilterDefinition<TD...
method UpdateOneAsync (line 292) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(FilterDefinition<TD...
method UpdateOneAsync (line 306) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(FilterDefinition<TD...
method UpdateOneAsync (line 321) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(FilterDefinition<TD...
method UpdateOne (line 334) | bool UpdateOne<TDocument, TKey, TField>(FilterDefinition<TDocument> fi...
method UpdateOne (line 348) | bool UpdateOne<TDocument, TKey, TField>(FilterDefinition<TDocument> fi...
method UpdateOne (line 362) | bool UpdateOne<TDocument, TKey, TField>(FilterDefinition<TDocument> fi...
method UpdateOne (line 377) | bool UpdateOne<TDocument, TKey, TField>(FilterDefinition<TDocument> fi...
method UpdateManyAsync (line 390) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(Expression<Func<TD...
method UpdateManyAsync (line 404) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(Expression<Func<TD...
method UpdateManyAsync (line 418) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(Expression<Func<TD...
method UpdateManyAsync (line 433) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(Expression<Func<TD...
method UpdateManyAsync (line 446) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(FilterDefinition<T...
method UpdateManyAsync (line 460) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(FilterDefinition<T...
method UpdateManyAsync (line 474) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(FilterDefinition<T...
method UpdateManyAsync (line 489) | Task<long> UpdateManyAsync<TDocument, TKey, TField>(FilterDefinition<T...
method UpdateManyAsync (line 500) | Task<long> UpdateManyAsync<TDocument, TKey>(FilterDefinition<TDocument...
method UpdateManyAsync (line 512) | Task<long> UpdateManyAsync<TDocument, TKey>(FilterDefinition<TDocument...
method UpdateManyAsync (line 524) | Task<long> UpdateManyAsync<TDocument, TKey>(FilterDefinition<TDocument...
method UpdateManyAsync (line 537) | Task<long> UpdateManyAsync<TDocument, TKey>(FilterDefinition<TDocument...
method UpdateManyAsync (line 548) | Task<long> UpdateManyAsync<TDocument, TKey>(Expression<Func<TDocument,...
method UpdateManyAsync (line 560) | Task<long> UpdateManyAsync<TDocument, TKey>(Expression<Func<TDocument,...
method UpdateManyAsync (line 572) | Task<long> UpdateManyAsync<TDocument, TKey>(Expression<Func<TDocument,...
method UpdateManyAsync (line 585) | Task<long> UpdateManyAsync<TDocument, TKey>(Expression<Func<TDocument,...
method UpdateMany (line 598) | long UpdateMany<TDocument, TKey, TField>(Expression<Func<TDocument, bo...
method UpdateMany (line 612) | long UpdateMany<TDocument, TKey, TField>(Expression<Func<TDocument, bo...
method UpdateMany (line 626) | long UpdateMany<TDocument, TKey, TField>(Expression<Func<TDocument, bo...
method UpdateMany (line 641) | long UpdateMany<TDocument, TKey, TField>(Expression<Func<TDocument, bo...
method UpdateMany (line 654) | long UpdateMany<TDocument, TKey, TField>(FilterDefinition<TDocument> f...
method UpdateMany (line 668) | long UpdateMany<TDocument, TKey, TField>(FilterDefinition<TDocument> f...
method UpdateMany (line 682) | long UpdateMany<TDocument, TKey, TField>(FilterDefinition<TDocument> f...
method UpdateMany (line 697) | long UpdateMany<TDocument, TKey, TField>(FilterDefinition<TDocument> f...
method UpdateMany (line 708) | long UpdateMany<TDocument, TKey>(Expression<Func<TDocument, bool>> fil...
method UpdateMany (line 720) | long UpdateMany<TDocument, TKey>(Expression<Func<TDocument, bool>> fil...
method UpdateMany (line 732) | long UpdateMany<TDocument, TKey>(Expression<Func<TDocument, bool>> fil...
method UpdateMany (line 745) | long UpdateMany<TDocument, TKey>(Expression<Func<TDocument, bool>> fil...
method UpdateMany (line 756) | long UpdateMany<TDocument, TKey>(FilterDefinition<TDocument> filter, U...
method UpdateMany (line 768) | long UpdateMany<TDocument, TKey>(FilterDefinition<TDocument> filter, U...
method UpdateMany (line 780) | long UpdateMany<TDocument, TKey>(FilterDefinition<TDocument> filter, U...
method UpdateMany (line 793) | long UpdateMany<TDocument, TKey>(FilterDefinition<TDocument> filter, U...
FILE: MongoDbGenericRepository/Abstractions/IBaseMongoRepository_Update_ClientSession.cs
type IBaseMongoRepository_Update_ClientSession (line 13) | public interface IBaseMongoRepository_Update_ClientSession
method UpdateOne (line 26) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 46) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 67) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 89) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 110) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 130) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 151) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 173) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 194) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 214) | bool UpdateOne<TDocument, TKey, TField>(
method UpdateOne (line 231) | bool UpdateOne<TDocument, TKey>(IClientSessionHandle session, TDocumen...
method UpdateOne (line 244) | bool UpdateOne<TDocument, TKey>(IClientSessionHandle session, TDocumen...
method UpdateOne (line 257) | bool UpdateOne<TDocument, TKey>(IClientSessionHandle session, TDocumen...
method UpdateOne (line 271) | bool UpdateOne<TDocument, TKey>(
method UpdateOneAsync (line 290) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 310) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 331) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 353) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 374) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 394) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 415) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 437) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 458) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 478) | Task<bool> UpdateOneAsync<TDocument, TKey, TField>(
method UpdateOneAsync (line 495) | Task<bool> UpdateOneAsync<TDocument, TKey>(IClientSessionHandle sessio...
method UpdateOneAsync (line 508) | Task<bool> UpdateOneAsync<TDocument, TKey>(IClientSessionHandle sessio...
method UpdateOneAsync (line 521) | Task<bool> UpdateOneAsync<TDocument, TKey>(IClientSessionHandle sessio...
method UpdateOneAsync (line 535) | Task<bool> UpdateOneAsync<TDocument, TKey>(
FILE: MongoDbGenericRepository/Abstractions/IBaseReadOnlyRepository.cs
type IBaseReadOnlyRepository (line 15) | public interface IBaseReadOnlyRepository
method GetByIdAsync (line 35) | Task<TDocument> GetByIdAsync<TDocument, TKey>(TKey id)
method GetByIdAsync (line 46) | Task<TDocument> GetByIdAsync<TDocument, TKey>(TKey id, CancellationTok...
method GetByIdAsync (line 57) | Task<TDocument> GetByIdAsync<TDocument, TKey>(TKey id, string partitio...
method GetByIdAsync (line 69) | Task<TDocument> GetByIdAsync<TDocument, TKey>(TKey id, string partitio...
method GetById (line 79) | TDocument GetById<TDocument, TKey>(TKey id)
method GetById (line 90) | TDocument GetById<TDocument, TKey>(TKey id, CancellationToken cancella...
method GetById (line 101) | TDocument GetById<TDocument, TKey>(TKey id, string partitionKey)
method GetById (line 113) | TDocument GetById<TDocument, TKey>(TKey id, string partitionKey, Cance...
method GetOneAsync (line 123) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 133) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 143) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 154) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 164) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 175) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 186) | Task<TDocument> GetOneAsync<TDocument, TKey>(FilterDefinition<TDocumen...
method GetOneAsync (line 199) | Task<TDocument> GetOneAsync<TDocument, TKey>(
method GetOne (line 213) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> condition)
method GetOne (line 224) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> conditio...
method GetOne (line 235) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> conditio...
method GetOne (line 247) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> conditio...
method GetOne (line 258) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> conditio...
method GetOne (line 271) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> conditio...
method GetOne (line 283) | TDocument GetOne<TDocument, TKey>(FilterDefinition<TDocument> conditio...
method GetOne (line 296) | TDocument GetOne<TDocument, TKey>(
method GetOneAsync (line 310) | Task<TDocument> GetOneAsync<TDocument, TKey>(Expression<Func<TDocument...
method GetOneAsync (line 321) | Task<TDocument> GetOneAsync<TDocument, TKey>(Expression<Func<TDocument...
method GetOneAsync (line 332) | Task<TDocument> GetOneAsync<TDocument, TKey>(Expression<Func<TDocument...
method GetOneAsync (line 344) | Task<TDocument> GetOneAsync<TDocument, TKey>(Expression<Func<TDocument...
method GetOne (line 354) | TDocument GetOne<TDocument, TKey>(Expression<Func<TDocument, bool>> fi...
method GetOne (line 365) | TDocument GetOne<TDocument, TKey>(Expression<Func<TDocument, bool>> fi...
method GetOne (line 376) | TDocument GetOne<TDocument, TKey>(Expression<Func<TDocument, bool>> fi...
method GetOne (line 388) | TDocument GetOne<TDocument, TKey>(Expression<Func<TDocument, bool>> fi...
method GetCursor (line 399) | IFindFluent<TDocument, TDocument> GetCursor<TDocument, TKey>(Expressio...
method AnyAsync (line 410) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 420) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 431) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 442) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 454) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 466) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 478) | Task<bool> AnyAsync<TDocument, TKey>(FilterDefinition<TDocument> condi...
method AnyAsync (line 491) | Task<bool> AnyAsync<TDocument, TKey>(
method Any (line 505) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition)
method Any (line 516) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, strin...
method Any (line 527) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, Count...
method Any (line 539) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, Count...
method Any (line 550) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, Cance...
method Any (line 562) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, strin...
method Any (line 574) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, Count...
method Any (line 587) | bool Any<TDocument, TKey>(FilterDefinition<TDocument> condition, Count...
method AnyAsync (line 597) | Task<bool> AnyAsync<TDocument, TKey>(Expression<Func<TDocument, bool>>...
method AnyAsync (line 608) | Task<bool> AnyAsync<TDocument, TKey>(Expression<Func<TDocument, bool>>...
method AnyAsync (line 619) | Task<bool> AnyAsync<TDocument, TKey>(Expression<Func<TDocument, bool>>...
method AnyAsync (line 631) | Task<bool> AnyAsync<TDocument, TKey>(Expression<Func<TDocument, bool>>...
method Any (line 641) | bool Any<TDocument, TKey>(Expression<Func<TDocument, bool>> filter)
method Any (line 652) | bool Any<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, Ca...
method Any (line 663) | bool Any<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, st...
method Any (line 675) | bool Any<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, st...
method GetAllAsync (line 685) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 696) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 707) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 719) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 730) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 742) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 754) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(FilterDefinition<TD...
method GetAllAsync (line 767) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(
method GetAll (line 781) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 792) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 803) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 815) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 826) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 838) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 850) | List<TDocument> GetAll<TDocument, TKey>(FilterDefinition<TDocument> co...
method GetAll (line 863) | List<TDocument> GetAll<TDocument, TKey>(
method GetAllAsync (line 877) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(Expression<Func<TDo...
method GetAllAsync (line 888) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(Expression<Func<TDo...
method GetAllAsync (line 899) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(Expression<Func<TDo...
method GetAllAsync (line 911) | Task<List<TDocument>> GetAllAsync<TDocument, TKey>(Expression<Func<TDo...
method GetAll (line 921) | List<TDocument> GetAll<TDocument, TKey>(Expression<Func<TDocument, boo...
method GetAll (line 932) | List<TDocument> GetAll<TDocument, TKey>(Expression<Func<TDocument, boo...
method GetAll (line 943) | List<TDocument> GetAll<TDocument, TKey>(Expression<Func<TDocument, boo...
method GetAll (line 955) | List<TDocument> GetAll<TDocument, TKey>(Expression<Func<TDocument, boo...
method CountAsync (line 965) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 976) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 987) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 999) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 1010) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 1022) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 1034) | Task<long> CountAsync<TDocument, TKey>(FilterDefinition<TDocument> con...
method CountAsync (line 1047) | Task<long> CountAsync<TDocument, TKey>(
method Count (line 1061) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition)
method Count (line 1072) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, str...
method Count (line 1083) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, Cou...
method Count (line 1095) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, Cou...
method Count (line 1106) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, Can...
method Count (line 1118) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, str...
method Count (line 1130) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, Cou...
method Count (line 1143) | long Count<TDocument, TKey>(FilterDefinition<TDocument> condition, Cou...
method CountAsync (line 1153) | Task<long> CountAsync<TDocument, TKey>(Expression<Func<TDocument, bool...
method CountAsync (line 1164) | Task<long> CountAsync<TDocument, TKey>(Expression<Func<TDocument, bool...
method CountAsync (line 1175) | Task<long> CountAsync<TDocument, TKey>(Expression<Func<TDocument, bool...
method CountAsync (line 1187) | Task<long> CountAsync<TDocument, TKey>(Expression<Func<TDocument, bool...
method Count (line 1197) | long Count<TDocument, TKey>(Expression<Func<TDocument, bool>> filter)
method Count (line 1208) | long Count<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, ...
method Count (line 1219) | long Count<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, ...
method Count (line 1231) | long Count<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, ...
method GetByMaxAsync (line 1247) | Task<TDocument> GetByMaxAsync<TDocument, TKey>(Expression<Func<TDocume...
method GetByMaxAsync (line 1260) | Task<TDocument> GetByMaxAsync<TDocument, TKey>(
method GetByMaxAsync (line 1277) | Task<TDocument> GetByMaxAsync<TDocument, TKey>(
method GetByMaxAsync (line 1294) | Task<TDocument> GetByMaxAsync<TDocument, TKey>(
method GetByMax (line 1310) | TDocument GetByMax<TDocument, TKey>(Expression<Func<TDocument, bool>> ...
method GetByMax (line 1323) | TDocument GetByMax<TDocument, TKey>(
method GetByMax (line 1339) | TDocument GetByMax<TDocument, TKey>(
method GetByMax (line 1356) | TDocument GetByMax<TDocument, TKey>(
method GetByMinAsync (line 1372) | Task<TDocument> GetByMinAsync<TDocument, TKey>(Expression<Func<TDocume...
method GetByMinAsync (line 1385) | Task<TDocument> GetByMinAsync<TDocument, TKey>(
method GetByMinAsync (line 1401) | Task<TDocument> GetByMinAsync<TDocument, TKey>(
method GetByMinAsync (line 1418) | Task<TDocument> GetByMinAsync<TDocument, TKey>(
method GetByMin (line 1434) | TDocument GetByMin<TDocument, TKey>(Expression<Func<TDocument, bool>> ...
method GetByMin (line 1447) | TDocument GetByMin<TDocument, TKey>(
method GetByMin (line 1463) | TDocument GetByMin<TDocument, TKey>(Expression<Func<TDocument, bool>> ...
method GetByMin (line 1477) | TDocument GetByMin<TDocument, TKey>(
method GetMaxValueAsync (line 1493) | Task<TValue> GetMaxValueAsync<TDocument, TKey, TValue>(Expression<Func...
method GetMaxValueAsync (line 1506) | Task<TValue> GetMaxValueAsync<TDocument, TKey, TValue>(
method GetMaxValueAsync (line 1522) | Task<TValue> GetMaxValueAsync<TDocument, TKey, TValue>(
method GetMaxValueAsync (line 1539) | Task<TValue> GetMaxValueAsync<TDocument, TKey, TValue>(
method GetMaxValue (line 1555) | TValue GetMaxValue<TDocument, TKey, TValue>(Expression<Func<TDocument,...
method GetMaxValue (line 1568) | TValue GetMaxValue<TDocument, TKey, TValue>(
method GetMaxValue (line 1584) | TValue GetMaxValue<TDocument, TKey, TValue>(
method GetMaxValue (line 1601) | TValue GetMaxValue<TDocument, TKey, TValue>(
method GetMinValueAsync (line 1617) | Task<TValue> GetMinValueAsync<TDocument, TKey, TValue>(Expression<Func...
method GetMinValueAsync (line 1630) | Task<TValue> GetMinValueAsync<TDocument, TKey, TValue>(
method GetMinValueAsync (line 1646) | Task<TValue> GetMinValueAsync<TDocument, TKey, TValue>(
method GetMinValueAsync (line 1663) | Task<TValue> GetMinValueAsync<TDocument, TKey, TValue>(
method GetMinValue (line 1679) | TValue GetMinValue<TDocument, TKey, TValue>(Expression<Func<TDocument,...
method GetMinValue (line 1692) | TValue GetMinValue<TDocument, TKey, TValue>(
method GetMinValue (line 1708) | TValue GetMinValue<TDocument, TKey, TValue>(
method GetMinValue (line 1725) | TValue GetMinValue<TDocument, TKey, TValue>(
method SumByAsync (line 1744) | Task<int> SumByAsync<TDocument, TKey>(Expression<Func<TDocument, bool>...
method SumByAsync (line 1756) | Task<int> SumByAsync<TDocument, TKey>(
method SumByAsync (line 1771) | Task<int> SumByAsync<TDocument, TKey>(Expression<Func<TDocument, bool>...
method SumByAsync (line 1784) | Task<int> SumByAsync<TDocument, TKey>(
method SumBy (line 1800) | int SumBy<TDocument, TKey>(Expression<Func<TDocument, bool>> filter, E...
method SumByAsync (line 1811) | Task<decimal> SumByAsync<TDocument, TKey>(Expression<Func<TDocument, b...
method SumByAsync (line 1823) | Task<decimal> SumByAsync<TDocument, TKey>(
method SumByAsync (line 1838) | Task<decimal> SumByAsync<TDocument, TKey>(Expression<Func<TDocument, b...
method SumByAsync (line 1851) | Task<decimal> SumByAsync<TDocument, TKey>(
method SumBy (line 1867) | decimal SumBy<TDocument, TKey>(
method ProjectOneAsync (line 1886) | Task<TProjection> ProjectOneAsync<TDocument, TProjection, TKey>(
method ProjectOneAsync (line 1902) | Task<TProjection> ProjectOneAsync<TDocument, TProjection, TKey>(
method ProjectOneAsync (line 1919) | Task<TProjection> ProjectOneAsync<TDocument, TProjection, TKey>(
method ProjectOneAsync (line 1937) | Task<TProjection> ProjectOneAsync<TDocument, TProjection, TKey>(
method ProjectOne (line 1954) | TProjection ProjectOne<TDocument, TProjection, TKey>(Expression<Func<T...
method ProjectOne (line 1968) | TProjection ProjectOne<TDocument, TProjection, TKey>(
method ProjectOne (line 1985) | TProjection ProjectOne<TDocument, TProjection, TKey>(
method ProjectOne (line 2003) | TProjection ProjectOne<TDocument, TProjection, TKey>(
method ProjectManyAsync (line 2020) | Task<List<TProjection>> ProjectManyAsync<TDocument, TProjection, TKey>(
method ProjectManyAsync (line 2036) | Task<List<TProjection>> ProjectManyAsync<TDocument, TProjection, TKey>(
method ProjectManyAsync (line 2053) | Task<List<TProjection>> ProjectManyAsync<TDocument, TProjection, TKey>(
method ProjectManyAsync (line 2071) | Task<List<TProjection>> ProjectManyAsync<TDocument, TProjection, TKey>(
method ProjectMany (line 2088) | List<TProjection> ProjectMany<TDocument, TProjection, TKey>(
method ProjectMany (line 2104) | List<TProjection> ProjectMany<TDocument, TProjection, TKey>(
method ProjectMany (line 2121) | List<TProjection> ProjectMany<TDocument, TProjection, TKey>(
method ProjectMany (line 2139) | List<TProjection> ProjectMany<TDocument, TProjection, TKey>(
method GroupBy (line 2162) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2180) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2199) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2219) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2239) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2259) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2280) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GroupBy (line 2302) | List<TProjection> GroupBy<TDocument, TGroupKey, TProjection, TKey>(
method GetSortedPaginatedAsync (line 2328) | Task<List<TDocument>> GetSortedPaginatedAsync<TDocument, TKey>(
method GetSortedPaginatedAsync (line 2350) | Task<List<TDocument>> GetSortedPaginatedAsync<TDocument, TKey>(
FILE: MongoDbGenericRepository/Abstractions/IMongoDbContext.cs
type IMongoDbContext (line 8) | public interface IMongoDbContext
method GetCollection (line 25) | IMongoCollection<TDocument> GetCollection<TDocument>(string partitionK...
method DropCollection (line 31) | void DropCollection<TDocument>(string partitionKey = null);
method SetGuidRepresentation (line 37) | void SetGuidRepresentation(MongoDB.Bson.GuidRepresentation guidReprese...
FILE: MongoDbGenericRepository/Abstractions/IReadOnlyMongoRepository.TKey.cs
type IReadOnlyMongoRepository (line 16) | public interface IReadOnlyMongoRepository<TKey>
method GetByIdAsync (line 26) | Task<TDocument> GetByIdAsync<TDocument>(TKey id)
method GetByIdAsync (line 35) | Task<TDocument> GetByIdAsync<TDocument>(TKey id, CancellationToken can...
method GetByIdAsync (line 44) | Task<TDocument> GetByIdAsync<TDocument>(TKey id, string partitionKey)
method GetByIdAsync (line 54) | Task<TDocument> GetByIdAsync<TDocument>(TKey id, string partitionKey, ...
method GetById (line 62) | TDocument GetById<TDocument>(TKey id)
method GetById (line 71) | TDocument GetById<TDocument>(TKey id, CancellationToken cancellationTo...
method GetById (line 80) | TDocument GetById<TDocument>(TKey id, string partitionKey)
method GetById (line 90) | TDocument GetById<TDocument>(TKey id, string partitionKey, Cancellatio...
method GetOneAsync (line 98) | Task<TDocument> GetOneAsync<TDocument>(Expression<Func<TDocument, bool...
method GetOneAsync (line 108) | Task<TDocument> GetOneAsync<TDocument>(Expression<Func<TDocument, bool...
method
Condensed preview — 254 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,809K chars).
[
{
"path": ".gitignore",
"chars": 4981,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": "CoreIntegrationTests/App.config",
"chars": 335,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n For more information on how to configure your ASP.NET application, please"
},
{
"path": "CoreIntegrationTests/CRUDObjectIdTests.cs",
"chars": 529,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing MongoDB.Bson;\n\nnamespace CoreIntegrationTests\n{\n public class CoreO"
},
{
"path": "CoreIntegrationTests/CRUDPartitionedCollectionNameAttributeTests.cs",
"chars": 939,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing MongoDbGenericRepository.Attributes;\nusing MongoDbGenericRepository.Mo"
},
{
"path": "CoreIntegrationTests/CRUDPartitionedTests.cs",
"chars": 707,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing MongoDbGenericRepository.Models;\nusing System;\n\nnamespace CoreIntegrat"
},
{
"path": "CoreIntegrationTests/CRUDTKeyPartitionedCollectionNameAttributeTests.cs",
"chars": 1939,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing MongoDB.Bson;\nusing MongoDbGenericRepository.Attributes;\nusing MongoDb"
},
{
"path": "CoreIntegrationTests/CRUDTKeyPartitionedTests.cs",
"chars": 787,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing MongoDbGenericRepository.Models;\nusing System;\n\nnamespace CoreIntegrat"
},
{
"path": "CoreIntegrationTests/CRUDTKeyTests.cs",
"chars": 489,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing System;\n\nnamespace CoreIntegrationTests\n{\n public class CoreTKeyTes"
},
{
"path": "CoreIntegrationTests/CRUDTests.cs",
"chars": 446,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing System;\n\nnamespace CoreIntegrationTests\n{\n public class CoreTestDoc"
},
{
"path": "CoreIntegrationTests/CoreIntegrationTests.csproj",
"chars": 1168,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>net8.0</TargetFramework>\n\t<Nullable>disable</"
},
{
"path": "CoreIntegrationTests/IdentityUserTests.cs",
"chars": 2425,
"preview": "using CoreIntegrationTests.Infrastructure;\nusing MongoDbGenericRepository.Models;\nusing System;\nusing System.Collection"
},
{
"path": "CoreIntegrationTests/Infrastructure/BaseMongoDbRepositoryTests.cs",
"chars": 2311,
"preview": "using MongoDbGenericRepository.Models;\nusing System.Collections.Generic;\nusing System;\n\nnamespace CoreIntegrationTests."
},
{
"path": "CoreIntegrationTests/Infrastructure/GlobalVariables.cs",
"chars": 333,
"preview": "using System;\n\nnamespace CoreIntegrationTests.Infrastructure\n{\n /// <summary>\n /// A class holding global variabl"
},
{
"path": "CoreIntegrationTests/Infrastructure/ITestRepository.cs",
"chars": 251,
"preview": "using MongoDbGenericRepository;\n\nnamespace CoreIntegrationTests\n{\n public interface ITestRepository : IBaseMongoRepo"
},
{
"path": "CoreIntegrationTests/Infrastructure/MongoDbConfig.cs",
"chars": 1057,
"preview": "using MongoDB.Bson.Serialization.Conventions;\nusing System.Threading;\n\nnamespace CoreIntegrationTests.Infrastructure\n{\n"
},
{
"path": "CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.Main.cs",
"chars": 35911,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Linq.Expressi"
},
{
"path": "CoreIntegrationTests/Infrastructure/MongoDbDocumentTestBase.Update.cs",
"chars": 16040,
"preview": "using MongoDB.Driver;\nusing MongoDbGenericRepository;\nusing MongoDbGenericRepository.Models;\nusing System;\nusing System"
},
{
"path": "CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.Main.cs",
"chars": 47627,
"preview": "using MongoDB.Driver;\nusing MongoDbGenericRepository.Models;\nusing System;\nusing System.Collections.Generic;\nusing Syst"
},
{
"path": "CoreIntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.Update.cs",
"chars": 16192,
"preview": "using MongoDB.Driver;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n"
},
{
"path": "CoreIntegrationTests/Infrastructure/MongoDbTestFixture.cs",
"chars": 1330,
"preview": "using MongoDbGenericRepository;\nusing MongoDbGenericRepository.Models;\nusing System;\nusing System.Collections.Concurren"
},
{
"path": "CoreIntegrationTests/Infrastructure/RandomExtensions.cs",
"chars": 2444,
"preview": "using System;\n\nnamespace CoreIntegrationTests.Infrastructure\n{\n // Thanks BlueRaja - Danny Pflughoeft https://stacko"
},
{
"path": "CoreIntegrationTests/Infrastructure/TestClasses.cs",
"chars": 2459,
"preview": "using MongoDB.Bson;\nusing MongoDB.Bson.Serialization.Attributes;\nusing MongoDbGenericRepository.Models;\nusing MongoDbGe"
},
{
"path": "CoreIntegrationTests/Infrastructure/TestRepository.cs",
"chars": 2375,
"preview": "using MongoDB.Bson;\nusing MongoDbGenericRepository;\nusing System;\n\nnamespace CoreIntegrationTests.Infrastructure\n{\n "
},
{
"path": "CoreUnitTests/.editorconfig",
"chars": 14739,
"preview": "# All Files\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 4\ninsert_final_newline = true\ntrim_trailing_whitespac"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddManyAsyncTests.cs",
"chars": 2251,
"preview": "using System;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnit"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddManyTests.cs",
"chars": 2129,
"preview": "using System;\nusing System.Linq;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing Co"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddOneAsyncTests.cs",
"chars": 2159,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructur"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/AddTests/AddOneTests.cs",
"chars": 2036,
"preview": "using System;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreUnitTests.Infrast"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteManyAsyncTests.cs",
"chars": 11125,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threadin"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteManyTests.cs",
"chars": 10220,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threadin"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteOneAsyncTests.cs",
"chars": 10440,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/DeleteTests/DeleteOneTests.cs",
"chars": 10501,
"preview": "namespace CoreUnitTests.BaseMongoRepositoryTests.DeleteTests;\n\nusing System;\nusing System.Linq.Expressions;\nusing Syste"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/BaseIndexTests.cs",
"chars": 1026,
"preview": "using CoreUnitTests.Infrastructure;\nusing MongoDB.Bson;\nusing MongoDB.Driver;\nusing Moq;\n\nnamespace CoreUnitTests.BaseMo"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateAscendingIndexAsyncTests.cs",
"chars": 10090,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateCombinedTextIndexAsyncTests.cs",
"chars": 10405,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading.Tasks;\nusing AutoF"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateDescendingIndexAsyncTests.cs",
"chars": 10123,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateHashedIndexAsyncTests.cs",
"chars": 10069,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infras"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/CreateTextIndexAsyncTests.cs",
"chars": 10003,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infras"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/DropIndexAsyncTests.cs",
"chars": 4432,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructur"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/IndexTests/GetIndexNamesAsyncTests.cs",
"chars": 6798,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateManyAsyncTests.cs",
"chars": 38589,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateManyTests.cs",
"chars": 37522,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateOneAsyncTests.cs",
"chars": 50084,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/BaseMongoRepositoryTests/UpdateTests/UpdateOneTests.cs",
"chars": 48773,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/CoreUnitTests.csproj",
"chars": 1850,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>net8.0</TargetFramework>\n <Nullab"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddManyAsyncTests.cs",
"chars": 5134,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddManyTests.cs",
"chars": 5019,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddOneAsyncTests.cs",
"chars": 4689,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructur"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbCreatorTests/AddOneTests.cs",
"chars": 4544,
"preview": "using System;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreUnitTests.Infrast"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteManyAsyncTests.cs",
"chars": 5615,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteManyTests.cs",
"chars": 5492,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteOneAsyncTests.cs",
"chars": 2925,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbEraserTests/DeleteOneTests.cs",
"chars": 2826,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/BaseIndexTests.cs",
"chars": 1399,
"preview": "using System.Collections.Generic;\nusing System.Threading;\nusing CoreUnitTests.Infrastructure;\nusing MongoDB.Bson;\nusing "
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateAscendingIndexAsyncTests.cs",
"chars": 6239,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateCombinedTextIndexAsyncTests.cs",
"chars": 6753,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thre"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateDescendingIndexAsyncTests.cs",
"chars": 6250,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateHashedIndexAsyncTests.cs",
"chars": 6496,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/CreateTextIndexAsyncTests.cs",
"chars": 6249,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/DropIndexAsyncTests.cs",
"chars": 3946,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructur"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbIndexHandlerTests/GetIndexNamesAsyncTests.cs",
"chars": 4511,
"preview": "using System;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnit"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/AnyAsyncTests.cs",
"chars": 10107,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/AnyTests.cs",
"chars": 9817,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUni"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/BaseReaderTests.cs",
"chars": 2472,
"preview": "using System.Collections.Generic;\nusing System.Threading;\nusing CoreUnitTests.Infrastructure;\nusing MongoDB.Driver;\nusin"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/CountAsyncTests.cs",
"chars": 10213,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/CountTests.cs",
"chars": 10003,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUni"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetAllAsyncTests.cs",
"chars": 11910,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetAllTests.cs",
"chars": 11571,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByIdAsyncTests.cs",
"chars": 4121,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByIdTests.cs",
"chars": 3996,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading;\nusing AutoFixture;\nusing Core"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMaxAsyncTests.cs",
"chars": 4415,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMaxTests.cs",
"chars": 4315,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMinAsyncTests.cs",
"chars": 4415,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetByMinTests.cs",
"chars": 4315,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMaxValueAsyncTests .cs",
"chars": 4141,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thre"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMaxValueTests .cs",
"chars": 4041,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thre"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMinValueAsyncTests .cs",
"chars": 4141,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thre"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetMinValueTests .cs",
"chars": 4041,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thre"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetOneAsyncTests.cs",
"chars": 11167,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/GetOneTests.cs",
"chars": 10876,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectManyAsyncTests.cs",
"chars": 4860,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectManyTests.cs",
"chars": 4528,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectOneAsyncTests.cs",
"chars": 4688,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbReaderTests/ProjectOneTests.cs",
"chars": 4568,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateManyAsyncTests.cs",
"chars": 22883,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateManyTests.cs",
"chars": 22457,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateOneAsyncTests.cs",
"chars": 31130,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/DataAccessTests/MongoDbUpdaterTests/UpdateOneTests.cs",
"chars": 30527,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/Infrastructure/FilterDefinitionExtensions.cs",
"chars": 600,
"preview": "namespace CoreUnitTests.Infrastructure;\n\nusing MongoDB.Bson;\nusing MongoDB.Bson.Serialization;\nusing MongoDB.Driver;\n\npu"
},
{
"path": "CoreUnitTests/Infrastructure/GenericTestContext.cs",
"chars": 433,
"preview": "using AutoFixture;\nusing AutoFixture.AutoMoq;\nusing Moq;\n\nnamespace CoreUnitTests.Infrastructure;\n\npublic class GenericT"
},
{
"path": "CoreUnitTests/Infrastructure/IndexExtensions.cs",
"chars": 2491,
"preview": "using System;\nusing MongoDB.Bson.Serialization;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository.Models;\nusing Xunit"
},
{
"path": "CoreUnitTests/Infrastructure/Model/Child.cs",
"chars": 245,
"preview": "namespace CoreUnitTests.Infrastructure.Model;\n\npublic class Child\n{\n public Child(string type, string value)\n {\n "
},
{
"path": "CoreUnitTests/Infrastructure/Model/Nested.cs",
"chars": 284,
"preview": "using System;\nusing MongoDB.Bson;\nusing MongoDB.Bson.Serialization.Attributes;\n\nnamespace CoreUnitTests.Infrastructure.M"
},
{
"path": "CoreUnitTests/Infrastructure/Model/PartitionedTestDocument.cs",
"chars": 262,
"preview": "using MongoDbGenericRepository.Models;\n\nnamespace CoreUnitTests.Infrastructure.Model;\n\npublic class PartitionedTestDocum"
},
{
"path": "CoreUnitTests/Infrastructure/Model/TestDocument.cs",
"chars": 736,
"preview": "using System;\nusing System.Collections.Generic;\nusing MongoDbGenericRepository.Models;\n\nnamespace CoreUnitTests.Infrastr"
},
{
"path": "CoreUnitTests/Infrastructure/Model/TestDocumentWithKey.cs",
"chars": 844,
"preview": "using System;\nusing System.Collections.Generic;\nusing MongoDbGenericRepository.Models;\n\nnamespace CoreUnitTests.Infrastr"
},
{
"path": "CoreUnitTests/Infrastructure/Model/TestProjection.cs",
"chars": 221,
"preview": "using System;\n\nnamespace CoreUnitTests.Infrastructure.Model;\n\npublic class TestProjection\n{\n public Guid TestDocument"
},
{
"path": "CoreUnitTests/Infrastructure/TestKeyedMongoRepository.cs",
"chars": 1002,
"preview": "using System;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository;\nusing MongoDbGenericRepository.DataAccess.Create;\nus"
},
{
"path": "CoreUnitTests/Infrastructure/TestKeyedMongoRepositoryContext.cs",
"chars": 1884,
"preview": "using System;\nusing AutoFixture;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository.DataAccess.Create;\nusing MongoDbGe"
},
{
"path": "CoreUnitTests/Infrastructure/TestKeyedReadOnlyMongoRepository.cs",
"chars": 819,
"preview": "using System;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository;\nusing MongoDbGenericRepository.DataAccess.Read;\n\nnam"
},
{
"path": "CoreUnitTests/Infrastructure/TestKeyedReadOnlyMongoRepositoryContext.cs",
"chars": 1027,
"preview": "using System;\nusing AutoFixture;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository.DataAccess.Read;\nusing Moq;\n\nnames"
},
{
"path": "CoreUnitTests/Infrastructure/TestMongoRepository.cs",
"chars": 932,
"preview": "using MongoDB.Driver;\nusing MongoDbGenericRepository;\nusing MongoDbGenericRepository.DataAccess.Create;\nusing MongoDbGen"
},
{
"path": "CoreUnitTests/Infrastructure/TestMongoRepositoryContext.cs",
"chars": 1850,
"preview": "using AutoFixture;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository.DataAccess.Create;\nusing MongoDbGenericRepositor"
},
{
"path": "CoreUnitTests/Infrastructure/TestReadOnlyMongoRepository.cs",
"chars": 753,
"preview": "using System;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository;\nusing MongoDbGenericRepository.DataAccess.Read;\n\nnam"
},
{
"path": "CoreUnitTests/Infrastructure/TestReadOnlyMongoRepositoryContext.cs",
"chars": 1099,
"preview": "using System;\nusing AutoFixture;\nusing AutoFixture.AutoMoq;\nusing MongoDB.Driver;\nusing MongoDbGenericRepository.DataAcc"
},
{
"path": "CoreUnitTests/Infrastructure/UpdateDefinitionExtensions.cs",
"chars": 749,
"preview": "using System;\nusing MongoDB.Bson.Serialization;\nusing MongoDB.Driver;\n\nnamespace CoreUnitTests.Infrastructure;\n\npublic s"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddManyAsyncTests.cs",
"chars": 1280,
"preview": "using System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastr"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddManyTests.cs",
"chars": 1231,
"preview": "using System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastr"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddOneAsyncTests.cs",
"chars": 1224,
"preview": "using System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreU"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/AddTests/AddOneTests.cs",
"chars": 1145,
"preview": "using System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreUnitTests.Infrastructure.Model;"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteManyAsyncTests.cs",
"chars": 5820,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threadin"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteManyTests.cs",
"chars": 5532,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threadin"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteOneAsyncTests.cs",
"chars": 5450,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/DeleteTests/DeleteOneTests.cs",
"chars": 5485,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastruct"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateAscendingIndexAsyncTests.cs",
"chars": 5229,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateCombinedTextIndexAsyncTests.cs",
"chars": 5366,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thre"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateDescendingIndexAsyncTests.cs",
"chars": 5246,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateHashedIndexAsyncTests.cs",
"chars": 5178,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/CreateTextIndexAsyncTests.cs",
"chars": 5144,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/DropIndexAsyncTests.cs",
"chars": 2423,
"preview": "using System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreU"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/IndexTests/GetIndexNamesAsyncTests.cs",
"chars": 3666,
"preview": "using System.Collections.Generic;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUni"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateManyAsyncTests.cs",
"chars": 19400,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateManyTests.cs",
"chars": 18853,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateOneAsyncTests.cs",
"chars": 15809,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyTypedRepositoryTests/UpdateTests/UpdateOneTests.cs",
"chars": 15356,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/AnyAsyncTests.cs",
"chars": 2761,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/AnyTests.cs",
"chars": 2628,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/CountAsyncTests.cs",
"chars": 3034,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/CountTests.cs",
"chars": 2848,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetAllAsyncTests.cs",
"chars": 3442,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetAllTests.cs",
"chars": 3309,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByIdAsyncTests.cs",
"chars": 3234,
"preview": "using System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreU"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByIdTests.cs",
"chars": 3101,
"preview": "using System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreUnitTests.Infrastructure.Model;"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMaxAsyncTests.cs",
"chars": 3672,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMaxTests.cs",
"chars": 3539,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMinAsyncTests.cs",
"chars": 3672,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetByMinTests.cs",
"chars": 3539,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMaxValueAsyncTests.cs",
"chars": 3398,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMaxValueTests.cs",
"chars": 3265,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMinValueAsyncTests.cs",
"chars": 3398,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetMinValueTests.cs",
"chars": 3265,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetOneAsyncTests.cs",
"chars": 3329,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetOneTests.cs",
"chars": 3196,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GetSortedPaginatedAsyncTests.cs",
"chars": 8923,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/GroupByTests.cs",
"chars": 9912,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUni"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectManyAsyncTests.cs",
"chars": 3944,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectManyTests.cs",
"chars": 3811,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectOneAsyncTests.cs",
"chars": 3673,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/ProjectOneTests.cs",
"chars": 3540,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/KeyedReadOnlyMongoRepositoryTests/SumByAsyncTests.cs",
"chars": 6309,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/AnyAsyncTests.cs",
"chars": 10453,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/AnyTests.cs",
"chars": 10062,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/CountAsyncTests.cs",
"chars": 11381,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/CountTests.cs",
"chars": 10937,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetAllAsyncTests.cs",
"chars": 12795,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetAllTests.cs",
"chars": 12452,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByIdAsyncTests.cs",
"chars": 6020,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructur"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByIdTests.cs",
"chars": 5789,
"preview": "using System;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructure;\nusing CoreUnitTests.Infrast"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMaxAsyncTests.cs",
"chars": 7004,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMaxTests.cs",
"chars": 6773,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMinAsyncTests.cs",
"chars": 7029,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetByMinTests.cs",
"chars": 6773,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMaxValueAsyncTests.cs",
"chars": 6558,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMaxValueTests.cs",
"chars": 6331,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMinValueAsyncTests.cs",
"chars": 6558,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetMinValueTests.cs",
"chars": 6327,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetOneAsyncTests.cs",
"chars": 12555,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetOneTests.cs",
"chars": 12167,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GetSortedPaginatedAsyncTests.cs",
"chars": 8672,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/GroupByTests.cs",
"chars": 19773,
"preview": "using System;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUni"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectManyAsyncTests.cs",
"chars": 7711,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectManyTests.cs",
"chars": 7485,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threading"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectOneAsyncTests.cs",
"chars": 7153,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/ProjectOneTests.cs",
"chars": 6922,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing AutoFixture;\nusing CoreUnitTests.Infrastructu"
},
{
"path": "CoreUnitTests/ReadOnlyMongoRepositoryTests/SumByAsyncTests.cs",
"chars": 12530,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing AutoFixture;\nus"
},
{
"path": "IntegrationTests/App.config",
"chars": 1171,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n For more information on how to configure your ASP.NET application, please"
},
{
"path": "IntegrationTests/CRUDObjectIdTests.cs",
"chars": 419,
"preview": "using IntegrationTests.Infrastructure;\nusing MongoDB.Bson;\nusing NUnit.Framework;\n\nnamespace IntegrationTests\n{\n pub"
},
{
"path": "IntegrationTests/CRUDPartitionedCollectionNameAttributeTests.cs",
"chars": 798,
"preview": "using IntegrationTests.Infrastructure;\nusing MongoDB.Bson.Serialization.Attributes;\nusing MongoDbGenericRepository.Attr"
},
{
"path": "IntegrationTests/CRUDPartitionedTests.cs",
"chars": 561,
"preview": "using IntegrationTests.Infrastructure;\nusing MongoDbGenericRepository.Models;\n\nnamespace IntegrationTests\n{\n public "
},
{
"path": "IntegrationTests/CRUDTKeyPartitionedCollectionNameAttributeTests.cs",
"chars": 789,
"preview": "using IntegrationTests.Infrastructure;\nusing MongoDbGenericRepository.Attributes;\nusing MongoDbGenericRepository.Models"
},
{
"path": "IntegrationTests/CRUDTKeyPartitionedTests.cs",
"chars": 700,
"preview": "using IntegrationTests.Infrastructure;\nusing MongoDB.Bson.Serialization.Attributes;\nusing MongoDbGenericRepository.Mode"
},
{
"path": "IntegrationTests/CRUDTKeyTests.cs",
"chars": 475,
"preview": "using IntegrationTests.Infrastructure;\nusing MongoDB.Bson.Serialization.Attributes;\nusing MongoDbGenericRepository.Mode"
},
{
"path": "IntegrationTests/CRUDTests.cs",
"chars": 343,
"preview": "using IntegrationTests.Infrastructure;\nusing NUnit.Framework;\n\nnamespace IntegrationTests\n{\n public class TestDocume"
},
{
"path": "IntegrationTests/Infrastructure/BaseMongoDbRepositoryTests.cs",
"chars": 1699,
"preview": "using MongoDbGenericRepository.Models;\nusing NUnit.Framework;\nusing System.Collections.Generic;\nusing System.Configurat"
},
{
"path": "IntegrationTests/Infrastructure/GlobalVariables.cs",
"chars": 329,
"preview": "using System;\n\nnamespace IntegrationTests.Infrastructure\n{\n /// <summary>\n /// A class holding global variables.\n"
},
{
"path": "IntegrationTests/Infrastructure/ITestRepository.cs",
"chars": 247,
"preview": "using MongoDbGenericRepository;\n\nnamespace IntegrationTests\n{\n public interface ITestRepository : IBaseMongoReposito"
},
{
"path": "IntegrationTests/Infrastructure/MongoDBDocumentTestBase.cs",
"chars": 29678,
"preview": "using MongoDbGenericRepository.Models;\nusing NUnit.Framework;\nusing System;\nusing System.Collections.Generic;\nusing Sys"
},
{
"path": "IntegrationTests/Infrastructure/MongoDbTKeyDocumentTestBase.cs",
"chars": 27310,
"preview": "using MongoDbGenericRepository.Models;\nusing NUnit.Framework;\nusing System;\nusing System.Collections.Generic;\nusing Sys"
},
{
"path": "IntegrationTests/Infrastructure/RandomExtensions.cs",
"chars": 2440,
"preview": "using System;\n\nnamespace IntegrationTests.Infrastructure\n{\n // Thanks BlueRaja - Danny Pflughoeft https://stackoverf"
},
{
"path": "IntegrationTests/Infrastructure/TestClasses.cs",
"chars": 2052,
"preview": "using MongoDB.Bson.Serialization.Attributes;\nusing MongoDbGenericRepository.Models;\nusing MongoDbGenericRepository.Util"
},
{
"path": "IntegrationTests/Infrastructure/TestRepository.cs",
"chars": 750,
"preview": "using MongoDB.Driver;\nusing MongoDbGenericRepository;\nusing MongoDbGenericRepository.Models;\nusing System;\nusing System"
},
{
"path": "IntegrationTests/IntegrationTests.csproj",
"chars": 14513,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "IntegrationTests/Properties/AssemblyInfo.cs",
"chars": 1499,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// Les informati"
},
{
"path": "IntegrationTests/packages.config",
"chars": 2731,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n <package id=\"AWSSDK.Core\" version=\"3.7.100.14\" targetFramework=\"net"
},
{
"path": "LICENSE",
"chars": 1074,
"preview": "MIT License\n\nCopyright (c) 2018 Alexandre SPIESER\n\nPermission is hereby granted, free of charge, to any person obtaining"
},
{
"path": "MongoDbGenericRepository/Abstractions/IBaseMongoRepository.cs",
"chars": 5601,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Thr"
},
{
"path": "MongoDbGenericRepository/Abstractions/IBaseMongoRepository_Update.cs",
"chars": 52204,
"preview": "using MongoDB.Driver;\nusing MongoDbGenericRepository.Models;\nusing System;\nusing System.Linq.Expressions;\nusing System."
},
{
"path": "MongoDbGenericRepository/Abstractions/IBaseMongoRepository_Update_ClientSession.cs",
"chars": 28476,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing MongoDB.Driver"
},
{
"path": "MongoDbGenericRepository/Abstractions/IBaseReadOnlyRepository.cs",
"chars": 139484,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Threadin"
},
{
"path": "MongoDbGenericRepository/Abstractions/IMongoDbContext.cs",
"chars": 1434,
"preview": "using MongoDB.Driver;\n\nnamespace MongoDbGenericRepository\n{\n /// <summary>\n /// This is the interface of the IMon"
}
]
// ... and 54 more files (download for full content)
About this extraction
This page contains the full source code of the alexandre-spieser/mongodb-generic-repository GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 254 files (2.6 MB), approximately 691.2k tokens, and a symbol index with 3503 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.