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

Test support: expose public constructor for sealed class used in ICodePackageActivationContext interface #776

Open
chuanboz opened this issue May 10, 2018 · 1 comment
Assignees

Comments

@chuanboz
Copy link

While implementing microsoft/service-fabric-aspnetcore#48 and microsoft/service-fabric-aspnetcore#9 , I'm trying to provide a complete test that could fully cover the logic, I found that ICodePackageActivationContext interface has referenced many sealed class in System.Fabric that does not have public constructor.
Some examples are:
ConfigurationPackage
ConfigurationPackageDescription
ConfigurationSettings
ConfigurationSection
Right now one workaround that I see is to use Microsoft Fakes, that could work for .net framework but does not work for .net core.
It would be best if such class could provide a public constructor even making it sealed, so that in my test I could create instances of ICodePackageActivationContext and test the behavior.

this is copied from microsoft/service-fabric-aspnetcore#54

@masnider
Copy link
Member

May also consider adding to https://github.com/loekd/ServiceFabric.Mocks

@gkhanna79 gkhanna79 transferred this issue from microsoft/service-fabric-issues Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants