@Test public void testGetAttributeCount() throws XmlPullParserException, IOException { assertThat(parser.getAttributeCount()) .isEqualTo(-1) .as("When no node is being explored the number of attributes should be -1."); forgeAndOpenDocument("<foo bar=\"bar\"/>"); assertThat(parser.getAttributeCount()).isEqualTo(1); }
private int attributeIndexOutOfIndex() { return parser.getAttributeCount() + 1; }