public void OverrideTest(string key, string[] values) { CameraSettings.Init(); Assert.True(CameraSettings.GetSetting(key) == null); foreach (string value in values) { CameraSettings.AddSetting(key, value); Assert.True(CameraSettings.GetSetting(key) == value); } CameraSettings.Reload(); Assert.True(CameraSettings.GetSetting(key) == values[values.Length - 1]); }
public void PersistanceTest() { CameraSettings.Init(); Assert.True(File.Exists(defaultPath), "A configuration file should have been made"); CameraSettings.AddSetting("test", "3444"); CameraSettings.AddSetting("test55", "nAMes and lotS of leTters to make A laRGer File"); Assert.True(File.Exists(defaultPath), "The camera configuration file should still exist"); CameraSettings.Reload(); Assert.True(CameraSettings.GetSetting("test") == "3444"); Assert.True(CameraSettings.GetSetting("test55") == "nAMes and lotS of leTters to make A laRGer File"); }
public void NoReload() { CameraSettings.Init(); CameraSettings.AddSetting("Peach", "Prince"); CameraSettings.AddSetting("Toad", "blue"); Assert.True(CameraSettings.GetSetting("Peach") == "Prince"); Assert.True(CameraSettings.GetSetting("Toad") == "blue"); ClearSetupFile(); CameraSettings.Init(); Assert.True(CameraSettings.GetSetting("Peach") == "Prince"); Assert.True(CameraSettings.GetSetting("Toad") == "blue"); CameraSettings.Reload(); Assert.True(CameraSettings.GetSetting("Peach") == null); Assert.True(CameraSettings.GetSetting("Toad") == null); }
public void CleanUp() { ClearSetupFile(); CameraSettings.Reload(); }