    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.SimpleJavaNode;
    8   import net.sourceforge.pmd.ast.SimpleNode;
    9   import net.sourceforge.pmd.jaxen.AttributeAxisIterator;
    10
    11  public class AttributeAxisIteratorTest extends TestCase {
    12
    13      public void testRemove() {
    14          SimpleNode n = new SimpleJavaNode(0);
    15          n.testingOnly__setBeginColumn(1);
    16          n.testingOnly__setBeginLine(1);
    17          AttributeAxisIterator iter = new AttributeAxisIterator(n);
    18          try {
    19              iter.remove();
    20              fail("Should have thrown an exception!");
    21          } catch (UnsupportedOperationException e) {
    22              // cool
    23          }
    24      }
    25
    26  }