What is your recommendation about where to specify global configuration
See original GitHub issueWith AssertionOptions.AssertEquivalencyUsing(options => options.IncludingAllRuntimeProperties());
I can specify my global configuration. But where to define it best?
Some static constructor of some random type?
Any advice?
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
Overview of global configurations
A global configuration represents a physical or logical piece of a product offering. It gathers configurations for itself and other contributing Rational® ...
Read more >Setting global configuration
Global configuration for your site is read from a file. The configuration is the mostly the same across SSGs with some minor differences....
Read more >Using Global Configuration - IBKR Guides
From within Mosaic: Use the File menu and select Global Configuration. From with Classic TWS: Use the Edit menu select Global Configuration.
Read more >Creating global configuration files
From the main menu of the Snap Creator GUI, select Management > Global Configurations. · In the Global Configurations pane, click Create Global....
Read more >Using the Global Configuration Object
The global configuration specified by AWS.Config provides default settings for service objects that you create subsequently, simplifying their configuration.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep. That would be my first thought as well. I would welcome a PR or at least a separate issue.
Might be a bit late to the party, but I think we now got a solution that works for us (we’re using xUnit.net). From my understanding shared context in xUnit.net doesn’t work, since the
AssertionOptions
is static, i.e. one shared instance per AppDomain, i.e. broader lifetime than any xUnit shared contexts.we’re calling this method from the static ctor of every test that requires the special assertions. Without the check
alreadyLoaded
we started to haveSystem.InvalidOperationException : Collection was modified; enumeration operation may not execute.
caused byBeEquivalentTo()
.Of course this can be a bit cumbersome if you have to do that in every unit test class. But that’s the only simple, reliable way I can think of currently, if you’re not into using some kind of magic as @ursenzler chose with Fody