public void IsValidationTest()
 {
     JdiLogo.Is().Src(ContainsStringMatcher.ContainsString("user-icon.jpg"))
     .Alt(Is.EqualTo(""));
     JdiLogo.AssertThat().Height(Is.EqualTo(30))
     .Width(Is.EqualTo(30));
 }
Example #2
0
 public void IsValidationTest()
 {
     JdiLogo.Is().Src(ContainsStringMatcher.ContainsString("jdi-logo.jpg"))
     .Alt(Is.EqualTo("Jdi Logo 2"));
     JdiLogo.AssertThat().Height(Is.EqualTo(100))
     .Width(Is.EqualTo(101));
 }
Example #3
0
 public void IsValidationTest()
 {
     TestSite.Html5Page.NameTextField.Is.Enabled()
     .Text(Is.EqualTo(Text))
     .Text(ContainsStringMatcher.ContainsString("Field"));
     TestSite.Html5Page.SurnameTextField.Is.Disabled();
 }
Example #4
0
 public void IsValidationTest()
 {
     TestSite.Html5Page.TextArea.Is().Enabled();
     TestSite.Html5Page.TextArea.SetText(Text);
     TestSite.Html5Page.TextArea.Is().Text(Is.EqualTo(Text))
     .Text(ContainsStringMatcher.ContainsString("Area"));
     TestSite.Html5Page.DisabledTextArea.Is().Displayed();
 }
 public void IsValidationTest()
 {
     _height.AssertThat().MinValue(Is.EqualTo(0.3))
     .MaxValue(Is.EqualTo(2.5))
     .StepValue((Is.EqualTo(0.2)));
     _height.Is().Placeholder(ContainsStringMatcher.ContainsString("20 cm increments"))
     .Number(Is.GreaterThanOrEqualTo(0.3))
     .Number(Is.LessThanOrEqualTo(2.5));
     _height.AssertThat().Number(Is.EqualTo(2.1));
     _height.Is().Enabled();
 }
        public void MatchShouldReturnFalseIfEmptyWhitelistString()
        {
            //Arrange
            var toCompare = new List <string>();
            var matcher   = new ContainsStringMatcher(toCompare);

            //Act
            var result = matcher.Match("test1");

            //Assert
            Assert.IsFalse(result); //Empty whitelist
        }
Example #7
0
 public void IsValidationTest()
 {
     TestSite.Html5Page.RedButton.Is.Displayed()
     .Enabled()
     .Text(Is.EqualTo("Big Red Button-Input"))
     .Text(ContainsStringMatcher.ContainsString("Red Button"))
     .CssClass(Is.EqualTo("uui-button red"))
     .Attr("type", Is.EqualTo("button"))
     .Tag(Is.EqualTo("input"));
     TestSite.Html5Page.BlueButton.Is.Text(ContainsStringMatcher.ContainsString("Blue Button".ToUpper()));
     TestSite.Html5Page.DisabledButton.Is.Text(ContainsStringMatcher.ContainsString("Disabled Button".ToUpper()))
     .Disabled();
 }
        public void MatchShouldReturnFalseOnNonMatchingKeyString()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new ContainsStringMatcher(toCompare);

            //Act
            var result = matcher.Match("test3");

            //Assert
            Assert.IsFalse(result); //key not contains any element of whitelist
        }
        public void MatchShouldReturnTrueOnKeyContainingElementString()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new ContainsStringMatcher(toCompare);

            //Act
            var result = matcher.Match("abctest1abc");

            //Assert
            Assert.IsTrue(result); //keys contains test1
        }
        public void MatchShouldReturnFalseIfMatchingBoolean()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new ContainsStringMatcher(toCompare);

            //Act
            var result = matcher.Match(true);

            //Assert
            Assert.IsFalse(result);
        }
        public void MatchShouldReturnTrueOnMatchingKey()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new ContainsStringMatcher(toCompare);

            //Act
            var result = matcher.Match(new Key("test1", "test1"));

            //Assert
            Assert.IsTrue(result); //keys contains test1
        }
        public void MatchShouldReturnFalseIfEmptyKeyString()
        {
            //Arrange
            var toCompare = new List <string>();

            toCompare.Add("test1");
            toCompare.Add("test2");
            var matcher = new ContainsStringMatcher(toCompare);

            //Act
            string key    = "";
            var    result = matcher.Match(key);

            //Assert
            Assert.IsFalse(result);
        }
Example #13
0
 public void LinkValidationTest()
 {
     TestSite.Html5Page.GithubLink.Is().Ref(ContainsStringMatcher.ContainsString("github"))
     .Alt(ContainsStringMatcher.ContainsString("JDI"));
 }