Skip to content

Make ServiceEndpoint an interface in C# SDK #2231

@liumiaojq

Description

@liumiaojq

Is your feature request related to a problem? Please describe.

I'm trying to create unit tests to a custom router class that inherits EndpointRouterDecorator. In unit test I'd like to pass mocked ServiceEndpoint to test GetNegotiateEndpoint method to cover the cases where some endpoints are offline. However since ServiceEndpoint is not an interface, and its Online property is not virtual, I'm unable to create a mocked ServiceEndpoint that is offline using moq.

Describe the solution you'd like

Make ServiceEndpoint an interface and use it everywhere in the code base, or make Online property virtual.

Additional context

Add any other context or screenshots about the feature request here.

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