Umplify/xunit-dependency-injection

Add support to add configuration from UserSecrets

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
There is no way to read the configuration from the UserSecret, I can only write the secret directly in the appsettings in plain text.

Describe the solution you'd like
Adding a configuration from UserSecrets is very simple.
The only problem that needs to be solved is that you need to expose the ConfigurationBuilder in TestFixture, rather than adding the Configuration by filename, I don't know if the test project has restrictions on this aspect of the implementation, but exposing the ConfigurationBuilder is clearly a better choice.

@Summpot I will look into this issue. Alternatively, you can feel free to fork this repo, implement your suggested approach and create a PR for my review.

@Summpot The ConfigurationBuilder's instance is already exposed per this line. It has to serve the purpose you're looking for. Therefore, I am closing this issue as no further actions is required in this context.