// attribute
// ----------------------------------------------------------------------------------------------------------------
@Test
public void shouldParseAttributeTest() {
AttributeTest result = parser.parseAttributeTest(tokenize("attribute(foo)"));
assertThat(result, is(notNullValue()));
assertThat(result.getAttributeName(), is(nameTest("foo")));
assertThat(result.getTypeName(), is(wildcard()));
result = parser.parseAttributeTest(tokenize("attribute(foo:bar)"));
assertThat(result, is(notNullValue()));
assertThat(result.getAttributeName(), is(nameTest("foo", "bar")));
assertThat(result.getTypeName(), is(wildcard()));
result = parser.parseAttributeTest(tokenize("attribute(foo:bar,baz)"));
assertThat(result, is(notNullValue()));
assertThat(result.getAttributeName(), is(nameTest("foo", "bar")));
assertThat(result.getTypeName(), is(nameTest("baz")));
result = parser.parseAttributeTest(tokenize("attribute(foo:bar,baz:bar)"));
assertThat(result, is(notNullValue()));
assertThat(result.getAttributeName(), is(nameTest("foo", "bar")));
assertThat(result.getTypeName(), is(nameTest("baz", "bar")));
result = parser.parseAttributeTest(tokenize("attribute(*,baz:bar)"));
assertThat(result, is(notNullValue()));
assertThat(result.getAttributeName(), is(wildcard()));
assertThat(result.getTypeName(), is(nameTest("baz", "bar")));
result = parser.parseAttributeTest(tokenize("attribute(foo:bar,*)"));
assertThat(result, is(notNullValue()));
assertThat(result.getAttributeName(), is(nameTest("foo", "bar")));
assertThat(result.getTypeName(), is(wildcard()));
}