Beispiel #1
0
        public async Task CanSaveAndLoadSettings()
        {
            var(settings, loadedSettings) = await MainSettings.TryLoadTypicalSettings();

            if (settings == null || !loadedSettings)
            {
                settings = new MainSettings();
            }

            await MainSettings.SaveSettings(settings);

            Assert.True((await MainSettings.TryLoadTypicalSettings()).loaded);
        }
Beispiel #2
0
        public async Task CanSaveAndLoadSettings()
        {
            MainSettings.TryLoadTypicalSettings(out var settings);

            if (settings == null)
            {
                settings = new MainSettings();
            }

            MainSettings.SaveSettings(settings);

            Assert.True(MainSettings.TryLoadTypicalSettings(out settings));
        }