Comments (4)
Hi, I am trying to mock the CosmosClient and facing the same issue. Any progress on this since then? If yes, please provide an example or means to do it. I am using xUnit and NSubstitute.
from azure-cosmos-dotnet-v3.
Hi, the constructor is marked as internal because we are planning to remove all documentclient dependencies. We didn't want people taking dependency on something we know will be removed in the future. I'm working on adding a new abstraction layer to allow mocking the object without the need of creating the CosmosClient.
from azure-cosmos-dotnet-v3.
@j82w can you make sure to also provide an example of mocking with this new abstraction layer? I know there are tons of different mock frameworks out there, just pick one (MOQ wink wink) to provide as an example.
from azure-cosmos-dotnet-v3.
The current design is to refactor all the classes from CosmosDatabases down to CosmosItems to abstract base classes. Then the implementation will be made internal. The base abstract class can then be mocked without needing to create the client.
from azure-cosmos-dotnet-v3.
Related Issues (20)
- Make the `VectorIndexes` setter as `internal` in `IndexingPolicy`
- TcpOpenConnectionTimeout TimeSpan contract not honoring values less than a second
- What is the stream needed for or how is it used in `PatchItemStreamAsync`? HOT 2
- Microsoft.Azure.Cosmos.Encryption.Custom 1.0.0-preview06 is incompatible with Cosmos 3.40.0-preview.0 and newer
- Change Feed / Processor: AVAD timeToLiveExpired deserialization Issue
- LINQ support for specifying FilterPredicate
- Clarification on versioning practices of preview packages HOT 1
- Session-level consistency across multiple SDK clients/across different processes HOT 2
- Add New Zealand North region in Public Contract
- CosmosClientOptions.Request is not respected. HOT 5
- TelemetrySpan is not failures are not reflected in-case of non-exceptions
- Benchmark using not releasing
- invalid syntax for GetDatabase - closing paren is shown as closing square bracket HOT 1
- ReadManyItemsAsync -> ReadManyTaskHelperAsync wraps forked IO task into Task.Run
- AggregateException (instead of CosmosException) being thrown on GetFeedRanges when Gateway fails HOT 11
- Add client option to use the System.Text.Json Serializer instead of Newtonsoft ... HOT 2
- DiagnosticSourceName seems to be "Azure.Cosmos" not "Azure.Cosmos.Operation" in stable version SDK HOT 5
- Default JasonDotNet serializer maxdepth HOT 1
- Inquiry on Implementing Custom Retry Logic with CosmosClient HOT 1
- Blazor WebAssembly Hangs When Initializing CosmosClient Due to Task.Run in SystemUsageMonitor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cosmos-dotnet-v3.