Esempio n. 1
0
        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"));
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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"));
        }
Esempio n. 4
0
        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"));
        }
Esempio n. 5
0
        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"));
        }
Esempio n. 6
0
        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();
        }
Esempio n. 7
0
        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"));
        }
Esempio n. 8
0
 public AccountSettingsSteps(RemoteWebDriver driver, AppSettings appSettings, SharedStorage sharedStorage)
     : base(appSettings)
 {
     Driver             = driver;
     this.sharedStorage = sharedStorage;
 }
Esempio n. 9
0
 public ShoppingBagSteps(RemoteWebDriver driver, AppSettings appSettings, SharedStorage sharedStorage)
     : base(appSettings)
 {
     Driver             = driver;
     this.sharedStorage = sharedStorage;
 }
Esempio n. 10
0
 public AccountSettingsPage(RemoteWebDriver driver, AppSettings appSettings, SharedStorage sharedStorage)
     : base(appSettings)
 {
     this.sharedStorage = sharedStorage;
 }