Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY] How to create a SubscriptionProperties in unit tests? #43998

Closed
wbuck opened this issue May 11, 2024 · 3 comments
Closed

[QUERY] How to create a SubscriptionProperties in unit tests? #43998

wbuck opened this issue May 11, 2024 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@wbuck
Copy link

wbuck commented May 11, 2024

Library name and version

Azure.Messaging.ServiceBus

Query/Question

I was mocking the ServiceBusAdministrationClient and realized I'm not table to create/initialize the SubscriptionProperties class.
Both constructors defined for the SubscriptionProperties class are internal...

Is there a factory I can use in my unit tests?
Or could someone make the constructors public for the SubscriptionProperties class?

Environment

No response

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels May 11, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@JoshLove-msft
Copy link
Member

Hi @wbuck,
You can use the ServiceBusModelFactory to create an instance of SubscriptionProperties.

@JoshLove-msft JoshLove-msft added the issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. label May 11, 2024
Copy link

Hi @wbuck. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

@github-actions github-actions bot removed the needs-team-attention This issue needs attention from Azure service team or SDK team label May 11, 2024
@wbuck wbuck closed this as completed May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed The Azure SDK team member assisting with this issue believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
Development

No branches or pull requests

2 participants