public void TestRemove2() { TimerManager timerManager = new TimerManager(); SharedStorage storage = CreateStorage("storage", timerManager); storage.Set("int", 10); storage.Set("float", 3.14f); storage.Set("bool", true); storage.Set("string", "This is a string"); storage.Destroy(); storage = CreateStorage("storage", timerManager, false); Assert.AreEqual(0, timerManager.Count()); storage.Remove("foo"); Assert.AreEqual(0, timerManager.Count()); timerManager.Update(0.016f); storage = CreateStorage("storage", timerManager, false); Assert.AreEqual(10, storage.GetInt("int")); Assert.AreEqual(3.14f, storage.GetFloat("float")); Assert.AreEqual(true, storage.GetBool("bool")); Assert.AreEqual("This is a string", storage.GetString("string")); }
private void StartNormal() { m_mode = Mode.Normal; MathHelp.InitRandom(); timerManager = CreateTimerManager(); notifications = CreateNotifications(timerManager); sharedStorage = CreateSharedStorage("storage", timerManager); inputManager = CreateInputManager(); if (inputManager is IUpdatable) { AddUpdatable(inputManager as IUpdatable); } CreateDemoRecorder(); assetManager = CreateAssetManager(); rootController = CreateRootController(); AddGameObject(rootController); started = true; OnStart(); inputManager.AddInputListener(rootController); rootController.Start(); }
public void TestSaveLoad3() { TimerManager timerManager = new TimerManager(); SharedStorage storage = CreateStorage("storage", timerManager); Assert.AreEqual(10, storage.GetInt("int", 10)); Assert.AreEqual(3.14f, storage.GetFloat("float", 3.14f)); Assert.AreEqual(true, storage.GetBool("bool", true)); Assert.AreEqual("default", storage.GetString("string", "default")); }
public void TestSaveLoad2() { TimerManager timerManager = new TimerManager(); SharedStorage storage = CreateStorage("storage", timerManager); Assert.AreEqual(0, storage.GetInt("int")); Assert.AreEqual(0.0f, storage.GetFloat("float")); Assert.AreEqual(false, storage.GetBool("bool")); Assert.AreEqual(null, storage.GetString("string")); }
public void TestSaveLoad4() { TimerManager timerManager = new TimerManager(); SharedStorage storage = CreateStorage("storage", timerManager); storage.Set("int", 10); timerManager.Update(0.016f); storage = CreateStorage("storage", timerManager, false); Assert.AreEqual(10, storage.GetFloat("int")); }
private void StartDemo(String path) { m_mode = Mode.Demo; timerManager = CreateTimerManager(); notifications = CreateNotifications(timerManager); sharedStorage = CreateSharedStorage("storage", timerManager); m_demoPlayer = new DemoPlayer(path); inputManager = new DemoPlayerInputManager(); assetManager = CreateAssetManager(); rootController = CreateRootController(); AddGameObject(rootController); started = true; OnStart(); inputManager.AddInputListener(rootController); rootController.Start(); }
public void TestClear() { TimerManager timerManager = new TimerManager(); SharedStorage storage = CreateStorage("storage", timerManager); storage.Set("int", 10); storage.Set("float", 3.14f); storage.Set("bool", true); storage.Set("string", "This is a string"); timerManager.Update(0.016f); storage = CreateStorage("storage", timerManager, false); storage.Clear(); timerManager.Update(0.016f); storage = CreateStorage("storage", timerManager, false); Assert.AreEqual(0, storage.GetInt("int")); Assert.AreEqual(0.0f, storage.GetFloat("float")); Assert.AreEqual(false, storage.GetBool("bool")); Assert.AreEqual(null, storage.GetString("string")); }
public AccountSettingsSteps(RemoteWebDriver driver, AppSettings appSettings, SharedStorage sharedStorage) : base(appSettings) { Driver = driver; this.sharedStorage = sharedStorage; }
public ShoppingBagSteps(RemoteWebDriver driver, AppSettings appSettings, SharedStorage sharedStorage) : base(appSettings) { Driver = driver; this.sharedStorage = sharedStorage; }
public AccountSettingsPage(RemoteWebDriver driver, AppSettings appSettings, SharedStorage sharedStorage) : base(appSettings) { this.sharedStorage = sharedStorage; }