/*
(c) Copyright 2008, 2009 Hewlett-Packard Development Company, LP
All rights reserved.
$Id$
*/
package com.hp.jena.rules.ast.tests;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;
import com.hp.jena.rules.ast.*;
import com.hp.jena.rules.ast.tests.TestElement.VisitElement;
public class TestElements
{
@Test public void ensureElementsExposesMembers()
{
List<Element> e = new Elements();
assertEquals( 0, e.size() );
}
static class VisitElements extends TestElement.VisitElement
{
@Override public void visitElements( Elements el )
{ seen.set( el ); }
}
@Test public void ensureTriplesVisitInvokesVisitTriples()
{
Elements e = new Elements();
VisitElement v = new VisitElements();
e.visit( v );
assertSame( e, v.seen.get() );
}
}