Examples of FindQueryTestCase


Examples of org.apache.stanbol.entityhub.test.query.FindQueryTestCase

        executeQuery(test);
    }
    @Test
    public void testFindWildcards() throws IOException, JSONException {
        //first a search without wildcards
        FindQueryTestCase test = new FindQueryTestCase("cia",
            Arrays.asList(
                "http://dbpedia.org/resource/CIA",
                "http://dbpedia.org/resource/CIA_World_Factbook"),
            Arrays.asList(
                "http://dbpedia.org/resource/Ciara"));
        test.setLanguage("en");
        executeQuery(test);
        //now the same search with wildcards
        test = new FindQueryTestCase("cia*",
            Arrays.asList(
                "http://dbpedia.org/resource/CIA",
                "http://dbpedia.org/resource/Ciara",
                "http://dbpedia.org/resource/CIA_World_Factbook"));
        test.setLanguage("en");
        executeQuery(test);
       
        test = new FindQueryTestCase("proto*",
            Arrays.asList(
                "http://dbpedia.org/resource/Prototype",
                "http://dbpedia.org/resource/Proton",
                "http://dbpedia.org/resource/Internet_Protocol"),
            Arrays.asList(
                "http://dbpedia.org/resource/Pretoria"));
        test.setLanguage("en");
        executeQuery(test);
        //now the same search with wildcards
        test = new FindQueryTestCase("pr?to*",
            Arrays.asList(
                "http://dbpedia.org/resource/Pretoria",
                "http://dbpedia.org/resource/Prototype",
                "http://dbpedia.org/resource/Proton",
                "http://dbpedia.org/resource/Internet_Protocol"));
        test.setLanguage("en");
        executeQuery(test);
    }
View Full Code Here
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.