Package com.google.refine.rdf.commands

Examples of com.google.refine.rdf.commands.AddPrefixCommand


  }
 
  @Test
  public void testAddPrefixCommand() throws Exception{
    RdfSchema schema = new RdfSchema();
    AddPrefixCommand command = new FakeAddPrefixCommand(ctxt,schema);
    MockHttpServletRequest request = new MockHttpServletRequest();
    MockHttpServletResponse response = new MockHttpServletResponse();
   
    request.addParameter("name", name);
    request.addParameter("uri", uri);
    request.addParameter("fetch", "web");
    request.addParameter("project", projectId);
    request.addParameter("fetch-url", uri);
   
    assertFalse(schema.getPrefixesMap().containsKey("foaf"));
    assertTrue(searcher.searchClasses("foaf:P", projectId).isEmpty());
    command.doPost(request, response);
    //verification
   
    //prefix is added to the project
    assertTrue(schema.getPrefixesMap().containsKey("foaf"));
    //search
View Full Code Here

TOP

Related Classes of com.google.refine.rdf.commands.AddPrefixCommand

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.