Skip to content

It is not possible to test code that uses this library #116

@RShergold

Description

@RShergold

We use Moq in our unit tests. For a simple query like this

var stack = new ContentstackClient(config);
var query = stack.ContentType("blog").Query();
var results = await query.Find();

We would normally mock ContentstackClient, ContentType, Query but we cant do this because they are concrete classes.

Can you please introduce the following interfaces IContentstackClient, IContentType, IQuery.

If this is not possible can you provide some documentation explaining how code using the contentstack client can be tested in isolation without connecting to the content stack servers. This would ideally cover scenarios involving mocking the fluent API chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions