okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
160 stars 100 forks source link

IOktaClient.GetCollection<T> should return an ICollectionClient<T> #581

Closed danverde closed 2 years ago

danverde commented 2 years ago

Describe the feature request?

Both overloads of the GetCollection<T> method on the IOktaClient interface return a concrete CollectionClient<T> rather than an ICollectionClient<T>. This makes testing a method that contains a call to GetCollection<T> difficult since Moq cannot mock a concrete class. The sdk should return the interface to improve testability of these methods.

New or Affected Resource(s)

Both overloads of IOktaAdapter.GetCollection<T>()

Provide a documentation link

No response

Additional Information?

No response

bryanapellanes-okta commented 2 years ago

@danverde Thanks for reaching out! You make a good point, I've entered an internal issue for tracking; we'll need to prioritize this against other work. If you're so inclined, please feel free to submit a pull request with your suggested changes and we can get the ball rolling sooner than later.

Internal Ref: OKTA-530112

Thanks for using Okta!

danverde commented 2 years ago

@bryanapellanes-okta Thanks for the quick response. PR has been created & linked to this issue