public void ParseStarTest() { Assert.IsTrue(GuiPath.parseIndexTesting("stuf[*]f", "stuf", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[*]", "stuff", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff3[*i]", "stuff3", 0, "i")); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[*id]", "stuff", 0, "id")); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[**id*]", "stuff", 0, "*id*")); }
public void ParseIndexTest() { Assert.IsTrue(GuiPath.parseIndexTesting("stuff", "stuff", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[3]", "stuff", 3, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff3[43]", "stuff3", 43, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[-4]", "stuff", -4, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[-654]", "stuff", -654, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[3", "stuff[3", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff3]", "stuff3]", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[*3]", "stuff", 0, "3")); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[3*]", "stuff[3*]", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("s[tu]ff[3]", "s[tu]ff", 3, null)); Assert.IsTrue(GuiPath.parseIndexTesting("[-98]", "", -98, null)); }
public void ParseVarTest() { TestState ts = TestState.getOnly("LT"); ts.Script = "UtilitiesTest.xml"; Var ins2 = new Var(); ts.AddNamedInstruction("one", ins2); ins2.Set = "4"; ins2.Execute(); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[$hi]", "stuff[$hi]", 0, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[$one]", "stuff", 4, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff3[$one;3]", "stuff3", 43, null)); Assert.IsTrue(GuiPath.parseIndexTesting("stuff[3$one]", "stuff[3$one]", 0, null)); }