コード例 #1
0
        public void TestPressKeysUsingSlim()
        {
            TestManager.InCompareData = false;
            InternetExplorerSlimFixture testFixture = new InternetExplorerSlimFixture();

            List<List<string>> testTable = new List<List<string>>();
            testTable.Add(new List<string> { "OpenBrowser" });
            testTable.Add(new List<string> { "NavigateBrowser", "http://www.google.com/" });
            testTable.Add(new List<string> { "PressKeys", "Name", "q", "sample text", "input" });
            testTable.Add(new List<string> { "CloseBrowser" });
            //testTable.Add(new List<string> { "SetElementAttribute", "Name", "btnG", "value", "hacked", "input" });

            List<object> list = testFixture.DoTable(testTable);

            Assert.IsTrue(TablePasses(list));
        }
コード例 #2
0
        public void InverseModifierFailedAPassingCommandTestUsingSlim()
        {
            InternetExplorerSlimFixture testFixture = new InternetExplorerSlimFixture();

            //<table><tr><td>SWATFixture</td></tr><tr><td><>&lt;&gt;AssertEqualTo</td><td>0</td><td>0</td></tr></table>
            List<List<string>> testTable = new List<List<string>>();
            testTable.Add(new List<string> { "<>&lt;&gt;AssertEqualTo", "0", "0" });

            List<object> list = testFixture.DoTable(testTable);

            Assert.IsTrue(TablePasses(list));
        }
コード例 #3
0
        public void FitnesseVariableRetrieverTestUsingSlim()
        {
            InternetExplorerSlimFixture testFixture = new InternetExplorerSlimFixture();

            //<table><tr><td>SWATFixture</td></tr><tr><td>RunScript</td><td>CSHARP</td><td>namespace SWAT{class test{public static string Main(){swatVars.Save(\"key2\", \"yo son\"); return swatVars.Recall(\"key2\");}}}</td>yo son<td></td></tr></table>
            List<List<string>> testTable = new List<List<string>>();
            testTable.Add(new List<string> { "RunScript", "CSHARP", "namespace SWAT{class test{public static string Main(){swatVars.Save(\"key2\", \"yo son\"); return swatVars.Recall(\"key2\");}}}", "yo son" });

            List<object> list = testFixture.DoTable(testTable);

            Assert.IsTrue(TablePasses(list));
        }