Package org.apache.stanbol.enhancer.benchmark

Examples of org.apache.stanbol.enhancer.benchmark.Benchmark


    public void testStructureAndDescriptions() throws Exception {
        assertEquals("Number of benchmarks", 2, benchmarks.size());
       
        final Iterator<? extends Benchmark> bit = benchmarks.iterator();
        {
            final Benchmark b = bit.next();
            assertEquals("Bob Marley was born in Kingston, Jamaica.", b.getInputText());
            assertEquals("First benchmark group count", 2, b.size());
            final Iterator<TripleMatcherGroup> git = b.iterator();
            assertEquals("Kingston must be found", git.next().getDescription());
            assertEquals("Bob Marley must be found as a musical artist", git.next().getDescription());
            assertFalse(git.hasNext());
        }
       
        {
            final Benchmark b = bit.next();
            assertEquals("Paris Hilton might live in Paris, but she prefers New York.", b.getInputText());
            assertEquals("Second benchmark group count", 5, b.size());
            final Iterator<TripleMatcherGroup> git = b.iterator();
            for(int i=1; i <= 5; i++) {
                assertEquals("Second benchmark group " + i, git.next().getDescription());
            }
            assertFalse(git.hasNext());
        }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.benchmark.Benchmark

Copyright © 2018 www.massapicom. 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.