Exemplo n.º 1
0
        public void shouldConstructProperJSFunctionCallWithMultipleParamsCastedToStringForFirefox2()
        {
            mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
            ISelenium selenium1 = (ISelenium)mockProcessor.MockInstance;
            FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium1, "test");
            string actual = flashSeleniumExtensionForTest.jsForFunction("functionName", 42.ToString(), 'S'.ToString(), (42.42).ToString());

            Assert.AreEqual("document['test'].functionName('42','S','42.42');", actual);
        }
Exemplo n.º 2
0
        public void shouldConstructProperJSFunctionCallWithParamsForFirefox2()
        {
            mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
            ISelenium selenium = (ISelenium)mockProcessor.MockInstance;
            FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium, "test");
            string actual = flashSeleniumExtensionForTest.jsForFunction("functionName", "Param1", "Param2");

            Assert.AreEqual("document['test'].functionName('Param1','Param2');", actual);
        }
 public void shouldConstructProperJSFunctionCallWithMultipleParamsCastedToStringForFirefox2()
 {
     mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
     ISelenium selenium1 = (ISelenium) mockProcessor.MockInstance;
     FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium1, "test");
     string actual = flashSeleniumExtensionForTest.jsForFunction("functionName",42.ToString(), 'S'.ToString(), (42.42).ToString());
     Assert.AreEqual("document['test'].functionName('42','S','42.42');", actual);
 }
 public void shouldConstructProperJSFunctionCallWithParamsForFirefox2()
 {
     mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
     ISelenium selenium = (ISelenium) mockProcessor.MockInstance;
     FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium, "test");
     string actual = flashSeleniumExtensionForTest.jsForFunction("functionName", "Param1", "Param2");
     Assert.AreEqual("document['test'].functionName('Param1','Param2');", actual);
 }