Ejemplo n.º 1
0
        public void NavigateTo(string url, string expectedText)
        {
            var webClientDriver = new WebClientDriver();
            webClientDriver.Navigate().GoToUrl(url);

            Assert.Contains(url, webClientDriver.Url);
            Assert.Contains(expectedText, webClientDriver.PageSource);
        }
Ejemplo n.º 2
0
        public void Valid(string pageSource)
        {
            var command = new IsJsonCommand {Test = new SeleniteTest()};
            var driver = new WebClientDriver
                {
                    PageSource = pageSource,
                };

            command.Execute(driver, null);
        }
Ejemplo n.º 3
0
        public void Invalid(string pageSource)
        {
            var command = new IsJsonCommand { Test = new SeleniteTest() };
            var driver = new WebClientDriver
            {
                PageSource = pageSource,
            };

            Assert.Throws<JsonReaderException>(() => command.Execute(driver, null));
        }
        public void Valid(string pageSource, string propertyName, string propertyValue)
        {
            var command = new IsJsonPropertyEqualCommand
            {
                Test = new SeleniteTest(),
                PropertyName = propertyName,
                PropertyValue = propertyValue,
            };

            var driver = new WebClientDriver
            {
                PageSource = pageSource,
            };

            command.Execute(driver, null);
        }