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); }
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"]); }
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); }