public void CanExportConfig() { string key = "key1"; var config = new SimpleTypedConfig <bool>(key, "", true); string configPath = Path.GetTempFileName(); var dataStore = new MockDataStore(); var configManager = GetConfigManager( new InitSettings() { DataStore = dataStore, Path = configPath }, config); // update config to false configManager.UpdateConfig(key, false, ConfigScope.CurrentUser); // export config file string path = Path.GetTempFileName(); Assert.False(dataStore.FileExists(path)); new JsonConfigHelper(configPath, dataStore).ExportConfigFile(path); // config file should be exported and be correct Assert.True(dataStore.FileExists(path)); var json = JsonUtilities.DeserializeJson(dataStore.ReadFileAsText(path), true); Assert.True(json.ContainsKey(ConfigFilter.GlobalAppliesTo)); var jsonConfig = json.GetProperty(ConfigFilter.GlobalAppliesTo) as IDictionary <string, object>; Assert.NotNull(jsonConfig); Assert.False((bool)jsonConfig.GetProperty(key)); }