Skip to content

Create app context switch test helper #3370

Closed
@paulmedynski

Description

@paulmedynski

We need a helper class to properly get/set and reset the global values in LocalAppContextSwitches during testing. We currently have a bunch of reflection code duplicated in several places, and most (all?) of them aren't properly capturing current values and ensuring they get reset after the test.

I suggest we create an RAII helper that captures current values during construction, has getters to retrieve the global values, setters to manipulate the global values, uses IDisposable to reset all values back to their original state.

Metadata

Metadata

Assignees

Labels

Area\TestsIssues that are targeted to tests or test projectsTriage Done ✔️Issues that are triaged by dev team and are in investigation.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions