1   /***
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3   */
4   package test.net.sourceforge.pmd.jaxen;
5   
6   import junit.framework.TestCase;
7   import net.sourceforge.pmd.ast.SimpleNode;
8   import net.sourceforge.pmd.jaxen.Attribute;
9   import net.sourceforge.pmd.jaxen.AttributeAxisIterator;
10  
11  import java.util.HashSet;
12  import java.util.Set;
13  
14  public class AttributeAxisIteratorTest extends TestCase {
15  
16      public void testRemove() {
17          SimpleNode n = new SimpleNode(0);
18          n.testingOnly__setBeginColumn(1);
19          n.testingOnly__setBeginLine(1);
20          AttributeAxisIterator iter = new AttributeAxisIterator(n);
21          try {
22              iter.remove();
23              fail("Should have thrown an exception!");
24          } catch (UnsupportedOperationException e) {
25              // cool
26          }
27      }
28  
29  }