Open ahoke-cr opened 2 years ago
@ahoke-cr good suggestion and we should make it an interface instead of a concrete type. Thanks for the input.
@mpodwysocki Thanks for the reply! We eagerly await such an update :)
I'm also eagerly awaiting such an update :) good to see the changes have already been merged. Is there an estimation on when a (prerelease) package wil be available on nuget?
Hi, Is there some process for moving the Merged PR forwards to a Nuget release? Other PRs have been released since this was merged. Thanks, Chris
@chrisfcarroll it looks like, according to the latest (4.1.1) release source code zip archive, this change was included though not documented in the release notes.
Thx for noticing that, I can raise a separate issue for publishing 4.1.1 to NuGet (the latest NuGet version is 2½ years ago)
Reviving this issue, hopefully this change will still be included in the library at some point. This would hugely improve testability.
Query/Question
I want to unit test my platform's services that interact with Azure Notification Hubs. I am currently attempting to write a test that deregisters a user's device using a tag identifying that user's registrations. To delete registrations, I need to get a
CollectionQueryResult<RegistrationDescription>
which is returned fromINotificationHubClient.GetRegistrationsByTagAsync(string)
.CollectionQueryResult<T>
has only one constructor which isinternal
, so I cannot initialize my own instance. As such, I am attempting to cast anIEnumerable<RegistrationDescription>
viaas
to this type, which fails. I am using Moq and testing with Xunit.Why is this not a Bug or a feature Request?
CollectionQueryResult<T>
is sealed and has an internal constructor for some reason unbeknownst to me. I can only presume this was an intentional design decision and not an oversight.Setup (please complete the following information if applicable):
OS: Windows 10 20H2 19042.1348 IDE: Visual Studio 2019 16.11.5 NuGet: Microsoft.Azure.NotificationHubs version 4.1.0
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report