private static void AssertLowerCaseUpperCase(Mock<INativeElement> elementMock) { // LowerCase elementMock.Expect(element => element.TagName).Returns("input"); elementMock.Expect(element => element.GetAttributeValue("type")).Returns("image"); // UpperCase var elementTag = new ElementTag("INPUT", "IMAGE"); Assert.IsTrue(elementTag.IsMatch(elementMock.Object), "Compare should compare using CultureInvariant"); elementMock.VerifyAll(); }
private static void AssertUpperCaseUpperCase(Mock <INativeElement> elementMock) { // UpperCase elementMock.Expect(element => element.TagName).Returns("INPUT"); elementMock.Expect(element => element.GetAttributeValue("type")).Returns("IMAGE"); // UpperCase var elementTag = new ElementTag("INPUT", "IMAGE"); Assert.IsTrue(elementTag.IsMatch(elementMock.Object), "Compare should compare using CultureInvariant"); elementMock.VerifyAll(); }
private static void AssertUpperCaseLowerCase(Mock <INativeElement> elementMock) { // UpperCase elementMock.Expect(element => element.TagName).Returns("INPUT"); elementMock.Expect(element => element.GetAttributeValue("type")).Returns("IMAGE"); // LowerCase var elementTag = new ElementTag("input", "image"); Assert.IsTrue(elementTag.IsMatch(elementMock.Object), "Compare should compare using CultureInvariant"); Assert.AreEqual("INPUT (image)", elementTag.ToString(), "ToString problem"); elementMock.VerifyAll(); }
public void IsMatchNullShouldThrow() { var elementTag = new ElementTag("tagname"); elementTag.IsMatch(null); }
public void IsMatchNullShouldThrow() { var elementTag = new ElementTag("tagname"); elementTag.IsMatch(null); }