Package com.hp.jena.rules.ast.tests

Source Code of com.hp.jena.rules.ast.tests.TestElements$VisitElements

/*
  (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() );
        }
    }
TOP

Related Classes of com.hp.jena.rules.ast.tests.TestElements$VisitElements

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.