public void IsMatchNameTest()
{
ElementFilter filter = new ElementFilter("$(Name) : 'Style'");
//
// Not a match
//
FieldElement noMatch = new FieldElement();
noMatch.Name = "Test";
Assert.IsFalse(filter.IsMatch(noMatch), "IsMatch did not return the expected value.");
//
// Match
//
FieldElement match = new FieldElement();
match.Name = "Style";
Assert.IsTrue(filter.IsMatch(match), "IsMatch did not return the expected value.");
match.Name = "ElementStyle";
Assert.IsTrue(filter.IsMatch(match), "IsMatch did not return the expected value.");
match.Name = "StyleElement";
Assert.IsTrue(filter.IsMatch(match), "IsMatch did not return the expected value.");
//
// Null
//
Assert.IsFalse(filter.IsMatch(null), "IsMatch did not return the expected value.");
}