terminal/src/cascadia/LocalTests_SettingsModel
Carlos Zamora 6b503ba887
Add Serializer to CascadiaSettings (#8018)
##  Summary of the Pull Request
This adds `ToJson` functions to `Profile`, `GlobalAppSettings`, and `ColorScheme`. They are used in `CascadiaSettings` to completely serialize an instance of the settings model. Thanks to #7923, all of the settings are `std::optional`, and `JsonUtils` only writes out values that are actually populated.

`CascadiaSettings::WriteSettingsToDisk` serializes the current settings and writes them to the settings.json. A backup file is created with your old contents.

#### Limitations:
- all of the color schemes are serialized regardless of them coming from defaults.json or settings.json
- keybindings/actions are copied/pasted

## References
#1564 - Settings UI
TSM Specs (#6904 and #7876)

## PR Checklist
* [x] Tests added/passed
2020-11-17 00:37:19 +00:00
..
ColorSchemeTests.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
CommandTests.cpp Rework JsonUtils' optional handling to let Converters see null (#8175) 2020-11-09 15:13:02 -08:00
DeserializationTests.cpp Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
JsonTestClass.h Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
KeyBindingsTests.cpp Rework JsonUtils' optional handling to let Converters see null (#8175) 2020-11-09 15:13:02 -08:00
LocalTests_SettingsModel.def Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
pch.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
pch.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
ProfileTests.cpp Store and expose hidden profiles (#8070) 2020-10-28 16:22:26 +00:00
SerializationTests.cpp Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
SettingsModel.LocalTests.vcxproj Add Serializer to CascadiaSettings (#8018) 2020-11-17 00:37:19 +00:00
TestUtils.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00