Skip to content

Add public parameterless constructor to InfluxDbClient to allow mocking for unit test #325

@vudzero

Description

@vudzero

Proposal:
It would be nice for the InfluxDbClient class to have a parameterless constructor to allow for easy mocking in unit test. An IInfluxDbClient interface would also to the trick!

Current behavior:
Impossible to mock InfluxDbClient since all constructors are "internal" and no Interface is available

Desired behavior:
Mock InfluxDbClient with a library like MOQ

Alternatives considered:
Create an adapter, but event there, classes like WriteApi are also internal, so impossible to create an adapter properly

Use case:
Allow unit testing of libraries using this wonderful library

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions