public void CleanupAfterAllTests() { EditingContextManager.SaveProjectSettings(projectSettingsBackup); EditingContextManager.SaveUserSettings(userSettingsBackup); EditorApplication.delayCall += () => { EditorWindow.GetWindow <VRView>("EditorVR", false).Close(); }; }
public void LoadUserSettings_NewerThanProjectSettings() { EditingContextManager.SaveUserSettings(newSettings); var loaded = EditingContextManager.LoadUserSettings(); Assert.AreEqual(newSettings.defaultContextName, loaded.defaultContextName); }
public void SaveUserSettings_UpdatesUserSettingsFile() { var path = EditingContextManager.userSettingsPath; var lastModTime = File.GetLastWriteTime(path); EditingContextManager.SaveUserSettings(newSettings); Assert.AreEqual(JsonUtility.ToJson(newSettings, true), File.ReadAllText(path)); Assert.Greater(File.GetLastWriteTime(path), lastModTime); }