Skip to content

Instantly share code, notes, and snippets.

@amischler
Created January 8, 2015 09:51
Show Gist options
  • Save amischler/f27dd57fc04d1dc4fca2 to your computer and use it in GitHub Desktop.
Save amischler/f27dd57fc04d1dc4fca2 to your computer and use it in GitHub Desktop.
import org.jcrom.util.NodeFilter;
import org.junit.Assert;
import org.junit.Test;
public class NodeFilterTest {
@Test
public void testNodeFilterDepth() {
NodeFilter nodeFilter = new NodeFilter("b", NodeFilter.DEPTH_INFINITE, 0);
Assert.assertEquals(true, nodeFilter.isIncluded("b", 0)); // OK
Assert.assertEquals(false, nodeFilter.isIncluded("a", 0)); // OK
Assert.assertEquals(true, nodeFilter.isIncluded("b2", 1)); // FAIL
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment