Exemplo n.º 1
0
        public void UIATestObject_NoCachedProperties()
        {
            AppModel    model      = AppModelManager.Load("UnitTestObjectModel1.json", ModelLoadLevel.ReplayOnly);
            ITestObject testObject = model.FindFirst(o => o.NodeName == "CachedPropertyTestNode");

            CachedPropertyGroup cachedObject = testObject.GetContext <CachedPropertyGroup>();

            Assert.AreEqual(null, cachedObject);
        }
Exemplo n.º 2
0
        public void UIATestObject_CachedProperties()
        {
            AppModel    model      = AppModelManager.Load("UnitTestObjectModel1.json", ModelLoadLevel.Full);
            ITestObject testObject = model.FindFirst(o => o.NodeName == "CachedPropertyTestNode");

            CachedPropertyGroup cachedObject = testObject.GetContext <CachedPropertyGroup>();

            Assert.AreNotEqual(null, cachedObject);

            Assert.AreEqual("asdfasfdasdfasdf.png", cachedObject.Properties["imageFile"]);
        }
Exemplo n.º 3
0
        public static ITestObject LoadData(string name, ITestObject parentTestObject)
        {
            ITestObject testObject = null;

            if (parentTestObject == null)
            {
                testObject = model.FindFirst(ControlKeys.Name, name);
            }
            else
            {
                parentTestObject.Find(ControlKeys.Name, name);
            }

            return(testObject);
        }