public void TestToken(string token, int expectedMatchCount, string attribute, string expectedValue, SWAT.Browser.MatchType matchType) { SWAT.Browser.ExpressionToken expToken = new Browser.ExpressionToken(token); Assert.AreEqual(expectedMatchCount, expToken.ExpectedMatchCount); Assert.AreEqual(SWAT.Browser.AttributeNormalizer.Normalize(attribute), expToken.Attribute); Assert.AreEqual(expectedValue, expToken.Value); Assert.AreEqual(matchType, expToken.MatchType); }
public void TestTokenFailedTest( string invalidString) { bool exceptionThrown = false; try { SWAT.Browser.ExpressionToken expToken = new Browser.ExpressionToken(invalidString); } catch (ArgumentException) { exceptionThrown = true; } Assert.IsTrue(exceptionThrown); }